From 1414a0d4d8b5254755184333d38118f1a2c16873 Mon Sep 17 00:00:00 2001 From: Marco Ballesio Date: Wed, 2 Dec 2020 13:48:44 -0800 Subject: [PATCH] libprocessgroup: move freezer to uid/pid hierarchy Migrate the freezer controller as an attribute for the uid/pid hierarchy Bug: 168907513 Test: manually verified that the freezer behavior was as expected after applying the enablers in ActivityManager Signed-off-by: Marco Ballesio Change-Id: Ica2c4bfd20190fb2f2dc0a530eb47e1a8427c522 --- libprocessgroup/profiles/cgroups.json | 2 +- libprocessgroup/profiles/task_profiles.json | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libprocessgroup/profiles/cgroups.json b/libprocessgroup/profiles/cgroups.json index 7bcb94bd9..962d2baa8 100644 --- a/libprocessgroup/profiles/cgroups.json +++ b/libprocessgroup/profiles/cgroups.json @@ -37,7 +37,7 @@ "Controllers": [ { "Controller": "freezer", - "Path": "freezer", + "Path": ".", "Mode": "0755", "UID": "system", "GID": "system" diff --git a/libprocessgroup/profiles/task_profiles.json b/libprocessgroup/profiles/task_profiles.json index 5b57bdd12..628098b55 100644 --- a/libprocessgroup/profiles/task_profiles.json +++ b/libprocessgroup/profiles/task_profiles.json @@ -46,7 +46,7 @@ "File": "cpu.uclamp.latency_sensitive" }, { - "Name": "FreezerState", + "Name": "Freezer", "Controller": "freezer", "File": "cgroup.freeze" } @@ -70,11 +70,11 @@ "Name": "Frozen", "Actions": [ { - "Name": "JoinCgroup", + "Name": "SetAttribute", "Params": { - "Controller": "freezer", - "Path": "" + "Name": "Freezer", + "Value": "1" } } ] @@ -83,11 +83,11 @@ "Name": "Unfrozen", "Actions": [ { - "Name": "JoinCgroup", + "Name": "SetAttribute", "Params": { - "Controller": "freezer", - "Path": "../" + "Name": "Freezer", + "Value": "0" } } ]