From 4cdac3a773110278a9aeab5bfb01fbbdf5eed95c Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Thu, 6 Jun 2024 12:47:26 +0000 Subject: [PATCH 1/2] powerhint: Enable auto migration margins/dvfs headroom by default And reduce DownRateLimitUs to 500us as the system should be more reactive now when something needs to rampup quickly. Enable pertask iowait boost too as with auto dvfs headroom enabled all tasks will start form 0 util_avg and this could impact iowait tasks without this being enabled to help them migrate up to bigger cores. Camera use cases should still use their own default DownRateLimitUs and disable this feature to keep their dvfs_headroom tuning intact. Bug: 315748906 Flag: EXEMPT powerhints are not compatible with flagging Signed-off-by: Qais Yousef Change-Id: Id8959b1debe8612623f47cdc103349ae0412a609 --- perf/powerhint-caiman.json | 30 +++++++++++++++++++++--------- perf/powerhint-komodo.json | 30 +++++++++++++++++++++--------- perf/powerhint-tokay.json | 30 +++++++++++++++++++++--------- 3 files changed, 63 insertions(+), 27 deletions(-) diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 97d2d384..6d32ea7d 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -59,7 +59,7 @@ "1000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 3, "ResetOnInit": true }, { @@ -100,7 +100,7 @@ "2000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 4, "ResetOnInit": true }, { @@ -142,7 +142,7 @@ "2000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 3, "ResetOnInit": true }, { @@ -213,7 +213,7 @@ "0", "1" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -223,7 +223,7 @@ "0", "1" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -257,7 +257,7 @@ "7", "8" ], - "DefaultIndex": 2, + "DefaultIndex": 4, "ResetOnInit": true }, { @@ -267,7 +267,7 @@ "0", "512" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -1183,6 +1183,12 @@ "Duration": 5000, "Value": "1" }, + { + "PowerHint": "LAUNCH", + "Node": "TARampupMultiplier", + "Duration": 0, + "Value": "4" + }, { "PowerHint": "LAUNCH_EXTEND", "Node": "CPUSkipMask", @@ -1273,6 +1279,12 @@ "Duration": 2000, "Value": "0" }, + { + "PowerHint": "LAUNCH_EXTEND", + "Node": "TARampupMultiplier", + "Duration": 0, + "Value": "4" + }, { "PowerHint": "LAUNCH_PMU", "Node": "PMU_POLL", @@ -3160,13 +3172,13 @@ "PowerHint": "DISPLAY_IDLE", "Node": "TARampupMultiplier", "Duration": 0, - "Value": "0" + "Value": "1" }, { "PowerHint": "DISPLAY_IDLE", "Node": "AdpfRampupMultiplier", "Duration": 0, - "Value": "0" + "Value": "1" }, { "PowerHint": "DISPLAY_UPDATE_IMMINENT", diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index 76d987b9..a4f2c5be 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -59,7 +59,7 @@ "1000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 3, "ResetOnInit": true }, { @@ -100,7 +100,7 @@ "2000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 4, "ResetOnInit": true }, { @@ -142,7 +142,7 @@ "2000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 3, "ResetOnInit": true }, { @@ -213,7 +213,7 @@ "0", "1" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -223,7 +223,7 @@ "0", "1" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -257,7 +257,7 @@ "7", "8" ], - "DefaultIndex": 2, + "DefaultIndex": 4, "ResetOnInit": true }, { @@ -267,7 +267,7 @@ "0", "512" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -1183,6 +1183,12 @@ "Duration": 5000, "Value": "1" }, + { + "PowerHint": "LAUNCH", + "Node": "TARampupMultiplier", + "Duration": 0, + "Value": "4" + }, { "PowerHint": "LAUNCH_EXTEND", "Node": "CPUSkipMask", @@ -1273,6 +1279,12 @@ "Duration": 2000, "Value": "0" }, + { + "PowerHint": "LAUNCH_EXTEND", + "Node": "TARampupMultiplier", + "Duration": 0, + "Value": "4" + }, { "PowerHint": "LAUNCH_PMU", "Node": "PMU_POLL", @@ -3160,13 +3172,13 @@ "PowerHint": "DISPLAY_IDLE", "Node": "TARampupMultiplier", "Duration": 0, - "Value": "0" + "Value": "1" }, { "PowerHint": "DISPLAY_IDLE", "Node": "AdpfRampupMultiplier", "Duration": 0, - "Value": "0" + "Value": "1" }, { "PowerHint": "DISPLAY_UPDATE_IMMINENT", diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 887af81a..3e16874c 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -59,7 +59,7 @@ "1000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 3, "ResetOnInit": true }, { @@ -100,7 +100,7 @@ "2000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 4, "ResetOnInit": true }, { @@ -142,7 +142,7 @@ "2000", "500" ], - "DefaultIndex": 0, + "DefaultIndex": 3, "ResetOnInit": true }, { @@ -213,7 +213,7 @@ "0", "1" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -223,7 +223,7 @@ "0", "1" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -257,7 +257,7 @@ "7", "8" ], - "DefaultIndex": 2, + "DefaultIndex": 4, "ResetOnInit": true }, { @@ -267,7 +267,7 @@ "0", "512" ], - "DefaultIndex": 0, + "DefaultIndex": 1, "ResetOnInit": true }, { @@ -1183,6 +1183,12 @@ "Duration": 5000, "Value": "1" }, + { + "PowerHint": "LAUNCH", + "Node": "TARampupMultiplier", + "Duration": 0, + "Value": "4" + }, { "PowerHint": "LAUNCH_EXTEND", "Node": "CPUSkipMask", @@ -1273,6 +1279,12 @@ "Duration": 2000, "Value": "0" }, + { + "PowerHint": "LAUNCH_EXTEND", + "Node": "TARampupMultiplier", + "Duration": 0, + "Value": "4" + }, { "PowerHint": "LAUNCH_PMU", "Node": "PMU_POLL", @@ -3160,13 +3172,13 @@ "PowerHint": "DISPLAY_IDLE", "Node": "TARampupMultiplier", "Duration": 0, - "Value": "0" + "Value": "1" }, { "PowerHint": "DISPLAY_IDLE", "Node": "AdpfRampupMultiplier", "Duration": 0, - "Value": "0" + "Value": "1" }, { "PowerHint": "DISPLAY_UPDATE_IMMINENT", From 74d165dc6e50a7a20cf804bcc343a5ed9f15296a Mon Sep 17 00:00:00 2001 From: Qais Yousef Date: Tue, 6 Aug 2024 10:51:42 +0000 Subject: [PATCH 2/2] powerhint: Set response_time_ms for clusters By default slow it down as auto margins can lead to faster ramping up in low activity use cases. Set it back to default in GAME mode to retain previous behavior. Set it explicitly for DISPLAY_IDLE as a potential area for more tuning in the future. Bug: 315748906 Flag: EXEMPT powerhints are not compatible with flagging Signed-off-by: Qais Yousef Change-Id: I1ffb04afb0911acc8aae4388e7f6478ebfc96dae --- perf/powerhint-caiman.json | 66 ++++++++++++++++++++++++++++++++++++++ perf/powerhint-komodo.json | 66 ++++++++++++++++++++++++++++++++++++++ perf/powerhint-tokay.json | 66 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 198 insertions(+) diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 6d32ea7d..34ea99ed 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -62,6 +62,16 @@ "DefaultIndex": 3, "ResetOnInit": true }, + { + "Name": "CPULittleClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "9", + "13" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "CPUMidClusterMaxFreq", "Path": "/sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq", @@ -103,6 +113,16 @@ "DefaultIndex": 4, "ResetOnInit": true }, + { + "Name": "CPUMidClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "52", + "56" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "CPUBigClusterMaxFreq", "Path": "/sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq", @@ -145,6 +165,16 @@ "DefaultIndex": 3, "ResetOnInit": true }, + { + "Name": "CPUBigClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu7/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "165", + "170" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "GPUDvfsPeriod", "Path": "/sys/devices/platform/1f000000.mali/dvfs_period", @@ -3180,6 +3210,24 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPULittleClusterResponseTimeMs", + "Duration": 0, + "Value": "13" + }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPUMidClusterResponseTimeMs", + "Duration": 0, + "Value": "56" + }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPUBigClusterResponseTimeMs", + "Duration": 0, + "Value": "170" + }, { "PowerHint": "DISPLAY_UPDATE_IMMINENT", "Node": "CPULittleClusterDownRateLimitUs", @@ -3420,6 +3468,24 @@ "Duration": 0, "Value": "2" }, + { + "PowerHint": "GAME", + "Node": "CPULittleClusterResponseTimeMs", + "Duration": 0, + "Value": "9" + }, + { + "PowerHint": "GAME", + "Node": "CPUMidClusterResponseTimeMs", + "Duration": 0, + "Value": "52" + }, + { + "PowerHint": "GAME", + "Node": "CPUBigClusterResponseTimeMs", + "Duration": 0, + "Value": "165" + }, { "PowerHint": "GAME", "Node": "PerTaskMaxIowaitBoost", diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index a4f2c5be..b2592b72 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -62,6 +62,16 @@ "DefaultIndex": 3, "ResetOnInit": true }, + { + "Name": "CPULittleClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "9", + "13" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "CPUMidClusterMaxFreq", "Path": "/sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq", @@ -103,6 +113,16 @@ "DefaultIndex": 4, "ResetOnInit": true }, + { + "Name": "CPUMidClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "52", + "56" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "CPUBigClusterMaxFreq", "Path": "/sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq", @@ -145,6 +165,16 @@ "DefaultIndex": 3, "ResetOnInit": true }, + { + "Name": "CPUBigClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu7/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "165", + "170" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "GPUDvfsPeriod", "Path": "/sys/devices/platform/1f000000.mali/dvfs_period", @@ -3180,6 +3210,24 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPULittleClusterResponseTimeMs", + "Duration": 0, + "Value": "13" + }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPUMidClusterResponseTimeMs", + "Duration": 0, + "Value": "56" + }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPUBigClusterResponseTimeMs", + "Duration": 0, + "Value": "170" + }, { "PowerHint": "DISPLAY_UPDATE_IMMINENT", "Node": "CPULittleClusterDownRateLimitUs", @@ -3420,6 +3468,24 @@ "Duration": 0, "Value": "2" }, + { + "PowerHint": "GAME", + "Node": "CPULittleClusterResponseTimeMs", + "Duration": 0, + "Value": "9" + }, + { + "PowerHint": "GAME", + "Node": "CPUMidClusterResponseTimeMs", + "Duration": 0, + "Value": "52" + }, + { + "PowerHint": "GAME", + "Node": "CPUBigClusterResponseTimeMs", + "Duration": 0, + "Value": "165" + }, { "PowerHint": "GAME", "Node": "PerTaskMaxIowaitBoost", diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 3e16874c..8ea616fd 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -62,6 +62,16 @@ "DefaultIndex": 3, "ResetOnInit": true }, + { + "Name": "CPULittleClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu0/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "10", + "13" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "CPUMidClusterMaxFreq", "Path": "/sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq", @@ -103,6 +113,16 @@ "DefaultIndex": 4, "ResetOnInit": true }, + { + "Name": "CPUMidClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu4/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "54", + "56" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "CPUBigClusterMaxFreq", "Path": "/sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq", @@ -145,6 +165,16 @@ "DefaultIndex": 3, "ResetOnInit": true }, + { + "Name": "CPUBigClusterResponseTimeMs", + "Path": "/sys/devices/system/cpu/cpu7/cpufreq/sched_pixel/response_time_ms", + "Values": [ + "164", + "170" + ], + "DefaultIndex": 1, + "ResetOnInit": true + }, { "Name": "GPUDvfsPeriod", "Path": "/sys/devices/platform/1f000000.mali/dvfs_period", @@ -3180,6 +3210,24 @@ "Duration": 0, "Value": "1" }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPULittleClusterResponseTimeMs", + "Duration": 0, + "Value": "13" + }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPUMidClusterResponseTimeMs", + "Duration": 0, + "Value": "56" + }, + { + "PowerHint": "DISPLAY_IDLE", + "Node": "CPUBigClusterResponseTimeMs", + "Duration": 0, + "Value": "170" + }, { "PowerHint": "DISPLAY_UPDATE_IMMINENT", "Node": "CPULittleClusterDownRateLimitUs", @@ -3420,6 +3468,24 @@ "Duration": 0, "Value": "2" }, + { + "PowerHint": "GAME", + "Node": "CPULittleClusterResponseTimeMs", + "Duration": 0, + "Value": "10" + }, + { + "PowerHint": "GAME", + "Node": "CPUMidClusterResponseTimeMs", + "Duration": 0, + "Value": "54" + }, + { + "PowerHint": "GAME", + "Node": "CPUBigClusterResponseTimeMs", + "Duration": 0, + "Value": "164" + }, { "PowerHint": "GAME", "Node": "PerTaskMaxIowaitBoost",