Add support for freezer cgroup
Adds the freezer cgroup to process groups Change-Id: Ib7a8dbe776ff156ff3827b9a659365384f3e6ac8 Bug: 143308662 Test: manual - frozen processes aren't scheduled for execution until unfrozen
This commit is contained in:
parent
e91c76b210
commit
726a68cb40
3 changed files with 43 additions and 0 deletions
|
@ -39,6 +39,13 @@
|
|||
"Mode": "0755",
|
||||
"UID": "system",
|
||||
"GID": "system"
|
||||
},
|
||||
{
|
||||
"Controller": "freezer",
|
||||
"Path": "/dev/freezer",
|
||||
"Mode": "0755",
|
||||
"UID": "system",
|
||||
"GID": "system"
|
||||
}
|
||||
],
|
||||
"Cgroups2": {
|
||||
|
|
|
@ -66,6 +66,32 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "Frozen",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "JoinCgroup",
|
||||
"Params":
|
||||
{
|
||||
"Controller": "freezer",
|
||||
"Path": "frozen"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "Unfrozen",
|
||||
"Actions": [
|
||||
{
|
||||
"Name": "JoinCgroup",
|
||||
"Params":
|
||||
{
|
||||
"Controller": "freezer",
|
||||
"Path": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Name": "NormalPerformance",
|
||||
"Actions": [
|
||||
|
|
|
@ -283,6 +283,16 @@ on init
|
|||
chmod 0664 /dev/cpuset/restricted/tasks
|
||||
chmod 0664 /dev/cpuset/tasks
|
||||
|
||||
# freezer cgroup entries
|
||||
mkdir /dev/freezer/frozen
|
||||
write /dev/freezer/frozen/freezer.state FROZEN
|
||||
chown system system /dev/freezer/cgroup.procs
|
||||
chown system system /dev/freezer/frozen
|
||||
chown system system /dev/freezer/frozen/freezer.state
|
||||
chown system system /dev/freezer/frozen/cgroup.procs
|
||||
|
||||
chmod 0444 /dev/freezer/frozen/freezer.state
|
||||
|
||||
# make the PSI monitor accessible to others
|
||||
chown system system /proc/pressure/memory
|
||||
chmod 0664 /proc/pressure/memory
|
||||
|
|
Loading…
Reference in a new issue