From 02f138915752690601f48fa2f2604bc69ac554c0 Mon Sep 17 00:00:00 2001 From: Pointer Kung Date: Tue, 9 Jul 2024 03:41:57 +0000 Subject: [PATCH] Powerhint tuning for photo capture UClamp.min of all threads in top app is set to mid core max capacity during photo capture, which will dispatch them to big core. Critical threads of photo capture will be interrupted due to their lower priority, while other cores idle. To deal with this situation, prefer_idle mask to big/mid cores can reduce the idle in mid cores. UClamp.min on nice can set UClamp.min of photo capture critical threads to mid core max capacity, while others as zero, this can make critical threads run on big core without frequently interrupted. By applying this, photo capture latency can be reduced with slight change of power consumption. Refer to ag/28118299 Bug: 345601796 Bug: 342502377 Test: Build pass, Boot to home Flag: NONE powerhint change does not support flags Change-Id: I86e36c64de4fe02e9c04171edbbc642cac1d0c3c --- perf/powerhint-tegu.json | 89 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) diff --git a/perf/powerhint-tegu.json b/perf/powerhint-tegu.json index 571bcba..9021f51 100644 --- a/perf/powerhint-tegu.json +++ b/perf/powerhint-tegu.json @@ -329,6 +329,42 @@ ], "ResetOnInit": true }, + { + "Name": "TAUclampMinOnNiceEnable", + "Path": "/proc/vendor_sched/groups/ta/uclamp_min_on_nice_enable", + "Values": [ + "1", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "TAUclampMinOnNiceMidValue", + "Path": "/proc/vendor_sched/groups/ta/uclamp_min_on_nice_mid_value", + "Values": [ + "600", + "0" + ], + "ResetOnInit": true + }, + { + "Name": "TAUclampMinOnNiceHighPrio", + "Path": "/proc/vendor_sched/groups/ta/uclamp_min_on_nice_high_prio", + "Values": [ + "119", + "120" + ], + "ResetOnInit": true + }, + { + "Name": "TAUclampMinOnNiceMidPrio", + "Path": "/proc/vendor_sched/groups/ta/uclamp_min_on_nice_mid_prio", + "Values": [ + "128", + "130" + ], + "ResetOnInit": true + }, { "Name": "FGUClampBoost", "Path": "/proc/vendor_sched/groups/fg/uclamp_min", @@ -445,6 +481,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_high", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -454,6 +491,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_mid", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -463,6 +501,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_low", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -1477,12 +1516,60 @@ "Duration": 3000, "Value": "0" }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "ReducePreferIdle", + "Duration": 3000, + "Value": "0" + }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", - "Node": "TAUClampBoost", + "Node": "TAPreferredIdleMaskHigh", + "Duration": 3000, + "Value": "0xf0" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAPreferredIdleMaskMid", + "Duration": 3000, + "Value": "0xf0" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAPreferredIdleMaskLow", + "Duration": 3000, + "Value": "0xf0" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAUclampMinOnNiceEnable", + "Duration": 3000, + "Value": "1" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAUclampMinOnNiceMidValue", "Duration": 3000, "Value": "600" }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAUclampMinOnNiceHighPrio", + "Duration": 3000, + "Value": "119" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAUclampMinOnNiceMidPrio", + "Duration": 3000, + "Value": "128" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "Node": "TAPreferIdle", + "Duration": 3000, + "Value": "1" + }, { "PowerHint": "CAMERA_THERMAL_SEVERE_BOOST", "Node": "CDPreferHighCap",