From 8e869b096efc0dcc865bd55a1851d123e9004349 Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Thu, 16 May 2024 16:48:56 +0000 Subject: [PATCH] powerhint: Add nodes to control per-task iowait boost It's disabled by default. Ensure camera and game mode explicitly disable it too as it is only required when auto margins are enabled for now. Ensure it is disabled when screen is off too as We don't want io activities to cause wake up on bigger cores while screen is off. Bug: 340534339 Signed-off-by: Qais Yousef (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:14258c30f125361b16d807fe4d7ea10a2106e4ed) Merged-In: Icbbfb2d332b412fa51d6d434d44d1ada8545338c Change-Id: Icbbfb2d332b412fa51d6d434d44d1ada8545338c --- perf/powerhint-caiman.json | 58 ++++++++++++++++++++++++++++++++++++++ perf/powerhint-komodo.json | 58 ++++++++++++++++++++++++++++++++++++++ perf/powerhint-tokay.json | 58 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 174 insertions(+) diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 23fbd03b..1913c798 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -259,6 +259,16 @@ "DefaultIndex": 2, "ResetOnInit": true }, + { + "Name": "PerTaskMaxIowaitBoost", + "Path": "/proc/vendor_sched/per_task_iowait_boost_max_value", + "Values": [ + "0", + "512" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "CPUUClampMaxFilterEnable", "Path": "/proc/vendor_sched/uclamp_max_filter_enable", @@ -1350,6 +1360,12 @@ "Duration": 0, "Value": "0x80" }, + { + "PowerHint": "DISPLAY_INACTIVE", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_LAUNCH", "Node": "CPUSkipMask", @@ -1884,6 +1900,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_EXTREME", "Node": "CPULittleClusterDownRateLimitUs", @@ -2052,6 +2074,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPULittleClusterDownRateLimitUs", @@ -2244,6 +2272,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CPULittleClusterDownRateLimitUs", @@ -2352,6 +2386,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CPULittleClusterDownRateLimitUs", @@ -2580,6 +2620,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", "Node": "CPUDVFSHeadroom", @@ -3133,6 +3179,12 @@ "Duration": 0, "Value": "2" }, + { + "PowerHint": "GAME", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "FACE_UNLOCK_BOOST", "Node": "CPUMidClusterMaxFreq", @@ -3223,6 +3275,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_PROJECT11", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_PROJECT11", "Node": "CPULittleClusterDownRateLimitUs", diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index 5b26375c..4e4e4c51 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -259,6 +259,16 @@ "DefaultIndex": 2, "ResetOnInit": true }, + { + "Name": "PerTaskMaxIowaitBoost", + "Path": "/proc/vendor_sched/per_task_iowait_boost_max_value", + "Values": [ + "0", + "512" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "CPUUClampMaxFilterEnable", "Path": "/proc/vendor_sched/uclamp_max_filter_enable", @@ -1350,6 +1360,12 @@ "Duration": 0, "Value": "0x80" }, + { + "PowerHint": "DISPLAY_INACTIVE", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_LAUNCH", "Node": "CPUSkipMask", @@ -1884,6 +1900,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_EXTREME", "Node": "CPULittleClusterDownRateLimitUs", @@ -2052,6 +2074,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPULittleClusterDownRateLimitUs", @@ -2244,6 +2272,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CPULittleClusterDownRateLimitUs", @@ -2352,6 +2386,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CPULittleClusterDownRateLimitUs", @@ -2580,6 +2620,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", "Node": "CPUDVFSHeadroom", @@ -3133,6 +3179,12 @@ "Duration": 0, "Value": "2" }, + { + "PowerHint": "GAME", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "FACE_UNLOCK_BOOST", "Node": "CPUMidClusterMaxFreq", @@ -3223,6 +3275,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_PROJECT11", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_PROJECT11", "Node": "CPULittleClusterDownRateLimitUs", diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 23fbd03b..1913c798 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -259,6 +259,16 @@ "DefaultIndex": 2, "ResetOnInit": true }, + { + "Name": "PerTaskMaxIowaitBoost", + "Path": "/proc/vendor_sched/per_task_iowait_boost_max_value", + "Values": [ + "0", + "512" + ], + "DefaultIndex": 0, + "ResetOnInit": true + }, { "Name": "CPUUClampMaxFilterEnable", "Path": "/proc/vendor_sched/uclamp_max_filter_enable", @@ -1350,6 +1360,12 @@ "Duration": 0, "Value": "0x80" }, + { + "PowerHint": "DISPLAY_INACTIVE", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_LAUNCH", "Node": "CPUSkipMask", @@ -1884,6 +1900,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_EXTREME", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_EXTREME", "Node": "CPULittleClusterDownRateLimitUs", @@ -2052,6 +2074,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_HIGH", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_HIGH", "Node": "CPULittleClusterDownRateLimitUs", @@ -2244,6 +2272,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_STANDARD", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_STANDARD", "Node": "CPULittleClusterDownRateLimitUs", @@ -2352,6 +2386,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_LOW", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_LOW", "Node": "CPULittleClusterDownRateLimitUs", @@ -2580,6 +2620,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_STREAMING_VIDEO_CALL", "Node": "CPUDVFSHeadroom", @@ -3133,6 +3179,12 @@ "Duration": 0, "Value": "2" }, + { + "PowerHint": "GAME", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "FACE_UNLOCK_BOOST", "Node": "CPUMidClusterMaxFreq", @@ -3223,6 +3275,12 @@ "Duration": 0, "Value": "0" }, + { + "PowerHint": "CAMERA_PROJECT11", + "Node": "PerTaskMaxIowaitBoost", + "Duration": 0, + "Value": "0" + }, { "PowerHint": "CAMERA_PROJECT11", "Node": "CPULittleClusterDownRateLimitUs",