From bfb341fb00b419a39b80de70453e8b6da2032f3b Mon Sep 17 00:00:00 2001 From: Rick Yiu Date: Thu, 11 Apr 2024 14:05:00 +0000 Subject: [PATCH] Disable auto prefer idle explictly for some conditions In auto prefer idle mode, a task in top-app will be granted prefer idle if it satisfied the conditions. So turn auto prefer idle off if top-app prefer_idle is explictly disabled. Also turn auto prefer off when other group enables prefer_idle explictly. Bug: 236868627 Test: build pass Change-Id: Id0dc5bda64686826f72aad4549b8edcb1ceb4502 --- perf/powerhint-husky.json | 82 ++++++++++++++++++++++++++++++++++ perf/powerhint-ripcurrent.json | 82 ++++++++++++++++++++++++++++++++++ perf/powerhint-shiba.json | 82 ++++++++++++++++++++++++++++++++++ 3 files changed, 246 insertions(+) diff --git a/perf/powerhint-husky.json b/perf/powerhint-husky.json index 3d26510..eb6e5a3 100644 --- a/perf/powerhint-husky.json +++ b/perf/powerhint-husky.json @@ -221,6 +221,16 @@ ], "ResetOnInit": true }, + { + "Name": "AutoPreferIdle", + "Path": "/proc/vendor_sched/auto_prefer_idle", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "BigClusterPowerDownTargetResidency", "Path": "/sys/devices/platform/cpupm/cpupm/cpd_cl2_target_residency", @@ -850,6 +860,12 @@ "Duration": 5000, "Value": "0" }, + { + "PowerHint": "LAUNCH", + "Node": "AutoPreferIdle", + "Duration": 5000, + "Value": "0" + }, { "PowerHint": "LAUNCH_GPU", "Node": "GPUDvfsPeriod", @@ -1057,6 +1073,12 @@ "Duration": 2000, "Value": "1" }, + { + "PowerHint": "LAUNCH_EXTEND", + "Node": "AutoPreferIdle", + "Duration": 2000, + "Value": "0" + }, { "PowerHint": "LAUNCH_PMU", "Node": "PMU_POLL", @@ -1069,6 +1091,12 @@ "Duration": 5000, "Value": "0" }, + { + "PowerHint": "DISPLAY_CHANGE", + "Node": "AutoPreferIdle", + "Duration": 5000, + "Value": "0" + }, { "PowerHint": "DISPLAY_CHANGE_GPU", "Node": "GPUDvfsPeriod", @@ -1235,6 +1263,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "DISPLAY_INACTIVE", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "DISPLAY_INACTIVE", "Node": "FGPreferIdle", @@ -1325,6 +1359,12 @@ "Duration": 1000, "Value": "1" }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "AutoPreferIdle", + "Duration": 1000, + "Value": "0" + }, { "PowerHint": "CAMERA_LAUNCH", "Node": "FGCpuset", @@ -1445,6 +1485,12 @@ "Duration": 100, "Value": "1" }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "AutoPreferIdle", + "Duration": 100, + "Value": "0" + }, { "PowerHint": "CAMERA_ZOOMING_BOOST", "Node": "PMU_POLL", @@ -1757,6 +1803,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_EXTREME", "Node": "CDHighCpusetCpus", @@ -1919,6 +1971,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CDHighCpusetCpus", @@ -1949,6 +2007,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CPUDVFSHeadroom", @@ -2093,6 +2157,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CPUDVFSHeadroom", @@ -2207,6 +2277,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", "Node": "CDPreferIdle", @@ -2628,6 +2704,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "GAME", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "GAME", "Node": "FGPreferIdle", diff --git a/perf/powerhint-ripcurrent.json b/perf/powerhint-ripcurrent.json index d2aaaf1..c43fb27 100644 --- a/perf/powerhint-ripcurrent.json +++ b/perf/powerhint-ripcurrent.json @@ -207,6 +207,16 @@ ], "ResetOnInit": true }, + { + "Name": "AutoPreferIdle", + "Path": "/proc/vendor_sched/auto_prefer_idle", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "BigClusterPowerDownTargetResidency", "Path": "/sys/devices/platform/cpupm/cpupm/cpd_cl2_target_residency", @@ -872,6 +882,12 @@ "Duration": 5000, "Value": "0" }, + { + "PowerHint": "LAUNCH", + "Node": "AutoPreferIdle", + "Duration": 5000, + "Value": "0" + }, { "PowerHint": "LAUNCH_GPU", "Node": "GPUDvfsPeriod", @@ -1079,6 +1095,12 @@ "Duration": 2000, "Value": "1" }, + { + "PowerHint": "LAUNCH_EXTEND", + "Node": "AutoPreferIdle", + "Duration": 2000, + "Value": "0" + }, { "PowerHint": "LAUNCH_PMU", "Node": "PMU_POLL", @@ -1091,6 +1113,12 @@ "Duration": 5000, "Value": "0" }, + { + "PowerHint": "DISPLAY_CHANGE", + "Node": "AutoPreferIdle", + "Duration": 5000, + "Value": "0" + }, { "PowerHint": "DISPLAY_CHANGE_GPU", "Node": "GPUDvfsPeriod", @@ -1234,6 +1262,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "DISPLAY_INACTIVE", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "DISPLAY_INACTIVE", "Node": "FGPreferIdle", @@ -1306,6 +1340,12 @@ "Duration": 1000, "Value": "1" }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "AutoPreferIdle", + "Duration": 1000, + "Value": "0" + }, { "PowerHint": "CAMERA_LAUNCH", "Node": "FGCpuset", @@ -1408,6 +1448,12 @@ "Duration": 100, "Value": "1" }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "AutoPreferIdle", + "Duration": 100, + "Value": "0" + }, { "PowerHint": "CAMERA_ZOOMING_BOOST", "Node": "PMU_POLL", @@ -1618,6 +1664,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_EXTREME", "Node": "CDHighCpusetCpus", @@ -1768,6 +1820,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CDHighCpusetCpus", @@ -1786,6 +1844,12 @@ "Duration": 0, "Value": "4-8" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "PowerHALCameraRunning", @@ -1912,6 +1976,12 @@ "Duration": 0, "Value": "4-8" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "PowerHALCameraRunning", @@ -2020,6 +2090,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", "Node": "CDPreferIdle", @@ -2375,6 +2451,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "GAME", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "GAME", "Node": "FGPreferIdle", diff --git a/perf/powerhint-shiba.json b/perf/powerhint-shiba.json index 5add250..c2b0aa7 100644 --- a/perf/powerhint-shiba.json +++ b/perf/powerhint-shiba.json @@ -211,6 +211,16 @@ ], "ResetOnInit": true }, + { + "Name": "AutoPreferIdle", + "Path": "/proc/vendor_sched/auto_prefer_idle", + "Values": [ + "0", + "1" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "BigClusterPowerDownTargetResidency", "Path": "/sys/devices/platform/cpupm/cpupm/cpd_cl2_target_residency", @@ -850,6 +860,12 @@ "Duration": 5000, "Value": "0" }, + { + "PowerHint": "LAUNCH", + "Node": "AutoPreferIdle", + "Duration": 5000, + "Value": "0" + }, { "PowerHint": "LAUNCH_GPU", "Node": "GPUDvfsPeriod", @@ -1057,6 +1073,12 @@ "Duration": 2000, "Value": "1" }, + { + "PowerHint": "LAUNCH_EXTEND", + "Node": "AutoPreferIdle", + "Duration": 2000, + "Value": "0" + }, { "PowerHint": "LAUNCH_PMU", "Node": "PMU_POLL", @@ -1069,6 +1091,12 @@ "Duration": 5000, "Value": "0" }, + { + "PowerHint": "DISPLAY_CHANGE", + "Node": "AutoPreferIdle", + "Duration": 5000, + "Value": "0" + }, { "PowerHint": "DISPLAY_CHANGE_GPU", "Node": "GPUDvfsPeriod", @@ -1164,6 +1192,12 @@ "Duration": 5000, "Value": "1" }, + { + "PowerHint": "DISPLAY_INACTIVE", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "DISPLAY_CHANGE", "Node": "FGPreferIdle", @@ -1331,6 +1365,12 @@ "Duration": 1000, "Value": "1" }, + { + "PowerHint": "CAMERA_LAUNCH", + "Node": "AutoPreferIdle", + "Duration": 1000, + "Value": "0" + }, { "PowerHint": "CAMERA_LAUNCH", "Node": "FGCpuset", @@ -1451,6 +1491,12 @@ "Duration": 100, "Value": "1" }, + { + "PowerHint": "CAMERA_ZOOMING_BOOST", + "Node": "AutoPreferIdle", + "Duration": 100, + "Value": "0" + }, { "PowerHint": "CAMERA_ZOOMING_BOOST", "Node": "PMU_POLL", @@ -1661,6 +1707,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_EXTREME", "Node": "CDHighCpusetCpus", @@ -1817,6 +1869,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CDPreferIdle", @@ -1853,6 +1911,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CPUDVFSHeadroom", @@ -1997,6 +2061,12 @@ "Duration": 0, "Value": "camera" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CPUDVFSHeadroom", @@ -2111,6 +2181,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", "Node": "CDPreferIdle", @@ -2520,6 +2596,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "GAME", + "Node": "AutoPreferIdle", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "GAME", "Node": "FGPreferIdle",