From d68bded2d6e4626511a36b4060ff8da9a30e568f Mon Sep 17 00:00:00 2001 From: zorahchen Date: Thu, 6 Jun 2024 07:11:40 +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. Bug:345601796 Performance Test:https://g3doc.corp.google.com/wireless/android/camera/camera_performance_analyzer/power_tuning/results/g3doc/pmu_retune_capture_enhanced/index.md?cl=alikz/1010 Kibble Power Test:https://g3doc.corp.google.com/wireless/android/camera/camera_performance_analyzer/power_tuning/results/g3doc/pmu_kibble_capture_rt_enhanced/index.md?cl=alikz/1044 Flag: NONE powerhint change does not support flags Change-Id: I8683b50b212d50b85b22b5cb48d712fc8eb43444 --- perf/powerhint-caiman.json | 91 ++++++++++++++++++++++++++++++- perf/powerhint-komodo.json | 89 +++++++++++++++++++++++++++++- perf/powerhint-ripcurrentpro.json | 91 ++++++++++++++++++++++++++++++- perf/powerhint-tokay.json | 91 ++++++++++++++++++++++++++++++- 4 files changed, 355 insertions(+), 7 deletions(-) diff --git a/perf/powerhint-caiman.json b/perf/powerhint-caiman.json index 7fc1824f..64965e19 100644 --- a/perf/powerhint-caiman.json +++ b/perf/powerhint-caiman.json @@ -273,6 +273,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", @@ -389,6 +425,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_high", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -398,6 +435,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_mid", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -407,6 +445,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_low", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -1494,9 +1533,57 @@ }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", - "Node": "TAUClampBoost", + "Node": "ReducePreferIdle", "Duration": 3000, - "Value": "600" + "Value": "0" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "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", diff --git a/perf/powerhint-komodo.json b/perf/powerhint-komodo.json index dcb55105..5a18b465 100644 --- a/perf/powerhint-komodo.json +++ b/perf/powerhint-komodo.json @@ -273,6 +273,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", @@ -389,6 +425,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_high", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -398,6 +435,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_mid", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -407,6 +445,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_low", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -1492,12 +1531,60 @@ "Duration": 3000, "Value": "20" }, + { + "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", diff --git a/perf/powerhint-ripcurrentpro.json b/perf/powerhint-ripcurrentpro.json index a3780cf4..f984eb4b 100644 --- a/perf/powerhint-ripcurrentpro.json +++ b/perf/powerhint-ripcurrentpro.json @@ -327,6 +327,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", @@ -443,6 +479,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_high", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -452,6 +489,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_mid", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -461,6 +499,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_low", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -1483,9 +1522,57 @@ }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", - "Node": "TAUClampBoost", + "Node": "ReducePreferIdle", "Duration": 3000, - "Value": "600" + "Value": "0" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "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", diff --git a/perf/powerhint-tokay.json b/perf/powerhint-tokay.json index 7fc1824f..64965e19 100644 --- a/perf/powerhint-tokay.json +++ b/perf/powerhint-tokay.json @@ -273,6 +273,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", @@ -389,6 +425,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_high", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -398,6 +435,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_mid", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -407,6 +445,7 @@ "Path": "/proc/vendor_sched/groups/ta/preferred_idle_mask_low", "Values": [ "0xff", + "0xf0", "0x7f" ], "ResetOnInit": true @@ -1494,9 +1533,57 @@ }, { "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", - "Node": "TAUClampBoost", + "Node": "ReducePreferIdle", "Duration": 3000, - "Value": "600" + "Value": "0" + }, + { + "PowerHint": "CAMERA_CAPTURE_CPU_THROTTLE", + "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",