From d69d33ff28c1fe77900368f867788f0c1bb7a2e1 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Wed, 2 Feb 2022 23:17:31 -0800 Subject: [PATCH] Change restricted cpuset dynamically Currently framework put tasks into restricted cpuset group when display is off. However, when unlocking screen, SystemUI still runs in restricted cpuset group leading to jank and delayed UDFPS action. This CL mitigates problem by dynamically changing restricted cpuset group to all cpus when display is back on. Bug: 217481359 Test: Build Signed-off-by: Wei Wang Change-Id: I0342b8a6e8040cdcf5cf5ca5129f7c58286b5a5c --- powerhint.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/powerhint.json b/powerhint.json index 4d7e0d7..f2c9b29 100644 --- a/powerhint.json +++ b/powerhint.json @@ -187,6 +187,15 @@ ], "ResetOnInit": true }, + { + "Name": "RestrictedCpuset", + "Path": "/dev/cpuset/restricted/cpus", + "Values": [ + "0-3", + "0-7" + ], + "ResetOnInit": true + }, { "Name": "CDHighCpusetCpus", "Path": "/dev/cpuset/camera-daemon-high-group/cpus", @@ -1285,6 +1294,18 @@ "Node": "MLUclampBoost", "Duration": 2000, "Value": "512" + }, + { + "PowerHint": "DEVICE_IDLE", + "Node": "RestrictedCpuset", + "Duration": 0, + "Value": "0-3" + }, + { + "PowerHint": "DISPLAY_INACTIVE", + "Node": "RestrictedCpuset", + "Duration": 0, + "Value": "0-3" } ] }