freezer: allow dynamic changes to freezer.state
create new profiles to allowing thawing and freezing back the freezer cgroup Bug: 151225245 Test: Manually verified that using the SetTaskProfiles method on the profiles thaws and freezes back the freezer cgroup. Change-Id: I7f3e193ebe79b49c1f6ac52b6138ff4ec26fc570
This commit is contained in:
parent
920393ddb7
commit
76eca5b4c1
|
@ -49,6 +49,11 @@
|
|||
"Name": "UClampMax",
|
||||
"Controller": "cpu",
|
||||
"File": "cpu.uclamp.max"
|
||||
},
|
||||
{
|
||||
"Name": "FreezerState",
|
||||
"Controller": "freezer",
|
||||
"File": "frozen/freezer.state"
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -531,6 +536,32 @@
|
|||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "FreezerThawed",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "SetAttribute",
|
||||
"Params":
|
||||
{
|
||||
"Name": "FreezerState",
|
||||
"Value": "THAWED"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "FreezerFrozen",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "SetAttribute",
|
||||
"Params":
|
||||
{
|
||||
"Name": "FreezerState",
|
||||
"Value": "FROZEN"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
|
|
|
@ -332,7 +332,7 @@ on init
|
|||
chown system system /dev/freezer/frozen/freezer.state
|
||||
chown system system /dev/freezer/frozen/cgroup.procs
|
||||
|
||||
chmod 0444 /dev/freezer/frozen/freezer.state
|
||||
chmod 0664 /dev/freezer/frozen/freezer.state
|
||||
|
||||
# make the PSI monitor accessible to others
|
||||
chown system system /proc/pressure/memory
|
||||
|
|
Loading…
Reference in New Issue