Repository navigation
soc: apple: clpc: tune T8142 idle sampling, CPU floor, and GPU busy-share ladder - #3710
Conversation
…ceiling
Bring apple_clpc_hw_t8142 in line with the T6050 and T8132 CLPC power
policies:
- Lower the bottom two CPU memory-floor quartiles from {2, 4, 6, 7} /
{1, 2, 3, 4} to {1, 3, 6, 7} / {0, 1, 3, 4} and require a three-sample
(12 ms) busy streak (.sustain = 3) so brief background E-core wakeups
do not lift the fabric rail while top-quartile work keeps full DCS 7 /
fabric 4 bandwidth.
- Enable per-CPU deferrable idle timers (.idle_on_time = true) so idle
NO_HZ CPUs take zero CLPC timer wakeups when no floor vote is held.
- Set .low_power_khz = 2220000 from the J813 ADT's
cpu-low-power-frequency-max so the standard low-power platform profile
is available on M5 Air.
Add KUnit and host-test coverage for apple_clpc_hw_t8142.
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
…ates Give the shared T8142 M5 MacBook Air (J813/J815) CLPC node the GPU busy-share memory-state ladder: DCS 1, 2, 5, 7 and fabric 0, 0, 1, 4, split at 160, 500 and 800 permille of the busy share reported by the G17 GPU driver. The top column matches apple_clpc_hw_t8142's DCS 7 / fabric 4 floor so saturated GPU workloads keep full memory bandwidth while light desktop compositing and video playback drop to DCS 1-2 / fabric 0. Parse t8142-j813-j815.dtsi directly in tools/asahi/clpc-gpu-demand-tests.py and verify all four ladder levels, threshold boundaries, negative controls, and down-step hold against apple_clpc_hw_t8142. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: HOLD at 86e5acd2
Blockers:
- Queued CI at
86e5acd2(2P/0F/25Q): Hosted CI (apple-build,dt-checks,host-tests,source,pr-text, KUnit suites) is still queued/running. Once CI finishes green, this is ready to approve (a livelow-powerplatform-profile toggle on a config withCONFIG_ACPI_PLATFORM_PROFILE=yis recommended if convenient, though.low_power_khz = 2220000matches J813 ADTcpu-low-power-frequency-maxand is covered by KUnit).
Checked:
- Audited full diff (
+159/-13acrossarch/arm64/boot/dts/apple/t8142-j813-j815.dtsi,drivers/soc/apple/clpc.c,tools/asahi/clpc-gpu-demand-tests.py):apple_clpc_hw_t8142lowers bottom two quartiles to{1, 3, 6, 7}/{0, 1, 3, 4}, adds.sustain = 3,.idle_on_time = true, and.low_power_khz = 2220000, preserving top-quartile DCS 7 / fabric 4 and ANE DCS 7 / fabric 3.t8142-j813-j815.dtsiaddsapple,gpu-busy-memory-states = <1 2 5 7>, <0 0 1 4>andapple,gpu-busy-permille = <160 500 800>matching the T8142 top-state floor.- KUnit (
apple_clpc_t8142_policy_test) andclpc-gpu-demand-tests.py(directt8142-j813-j815.dtsiparsing + negative controls + ladder transitions) cleanly cover the new policy.
- Verified J813 M5 MBA (
T8142, fw 27.2) hardware numbers: 60 fpsvkcubedropped0x47 -> 0x01(~760–800 mW saved), uncappedvkcubelifted cleanly to0x47and returned to0x00on idle, idle CLPC sampling dropped20–70/s -> 0–8/s,0failed units,0new kernel warnings/errors.
Evidence
- Head commit:
86e5acd29fe4880d6b2d4232e116e2c06b53a52b(MERGEABLEintomain). - CI snapshot:
2P/0F/25Q.
|
J815 row (MacBook Air 15" M5, T8142, fw 27.2): the two commits at 86e5acd cherry-picked onto a J815 tree based on main e6c7b03 (one context conflict in Total System Power (SMC, median of 40 x 1 s samples), before -> after:
GPU throughput is unchanged: gpubench-vk render.heavy GPU time 260.9 -> 249.6 us, render.tvb 19.81 -> 19.01 ms; Godot TPS demo (Vulkan, 1920x1080, two runs) 49.7 / 49.9 / 57.6 and 50.2 / 50.0 / 57.4 fps before, 51.3 / 51.1 / 57.7 and 50.2 / 50.2 / 57.6 fps after. A dEQP-VK gate run (11,297 Pass) and 5 more CTS slices (about 470k cases) on this kernel had 0 GPU faults. Not run here: the KUnit/host tests (no host rustc on this machine) and the Tested-by: Nick nekreshen@yandex.ru |
There was a problem hiding this comment.
Verdict: MERGE at 86e5acd29fe4
Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.
Checked: - Audited full diff (+159/-13 across arch/arm64/boot/dts/apple/t8142-j813-j815.dtsi, drivers/soc/apple/clpc.c, tools/asahi/clpc-gpu-demand-tests.py):
apple_clpc_hw_t8142lowers bottom two quartiles to{1, 3, 6, 7}/{0, 1, 3, 4}, adds.sustain = 3,.idle_on_time = true, and.low_power_khz = 2220000, preserving top-quartile DCS 7 / fabric 4 and ANE DCS 7 / fabric 3.t8142-j813-j815.dtsiaddsapple,gpu-busy-memory-states = <1 2 5 7>, <0 0 1 4>andapple,gpu-busy-permille = <160 500 800>matching the T8142 top-state floor.- KUnit (
apple_clpc_t8142_policy_test) andclpc-gpu-demand-tests.py(directt8142-j813-j815.dtsiparsing + negative controls + ladder transitions) cleanly cover the new policy. - Verified J813 M5 MBA (
T8142, fw 27.2) hardware numbers: 60 fpsvkcubedropped0x47 -> 0x01(~760–800 mW saved), uncappedvkcubelifted cleanly to0x47and returned to0x00on idle, idle CLPC sampling dropped20–70/s -> 0–8/s,0failed units,0new kernel warnings/errors.
Follow-ups (not blocking): queued CI; optional low-power profile toggle
|
Merging at |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed 86e5acd. The lower CPU floor and GPU ladder preserve the top DCS/fabric states and the ANE floor. The J813 trial shows the ladder dropping under light load and restoring full bandwidth at saturation. The J815 row covers the 15-inch model. The focused host checks and Apple build passed.
What: Bring T8142 (M5 MacBook Air J813/J815) CLPC power management in line with T6050 and T8132:
apple_clpc_hw_t8142from{2, 4, 6, 7}/{1, 2, 3, 4}to{1, 3, 6, 7}/{0, 1, 3, 4}, require a three-sample (12 ms) busy streak (.sustain = 3), enable per-CPU deferrable idle timers (.idle_on_time = true), and set.low_power_khz = 2220000from the J813 ADTcpu-low-power-frequency-max.apple,gpu-busy-memory-states = <1 2 5 7>, <0 0 1 4>andapple,gpu-busy-permille = <160 500 800>to&clpcint8142-j813-j815.dtsiso light desktop compositing and 60 fps workloads drop toDCS 1 / fabric 0while saturated GPU workloads keep fullDCS 7 / fabric 4.apple_clpc_t8142_policy_test) and directt8142-j813-j815.dtsiparsing + negative controls intools/asahi/clpc-gpu-demand-tests.py.Tested:
7.3.0-aurora-j813-power+(carrying this 2-commit seriesc052e94b0a41..86e5acd29fe4byte-identically onmainb158a197adc9alongside two independent cpufreq/dcp-audio commits,dpms=On, backlight 400/500):vkcube --present_mode 2(26–36‰ GPU busy): CLPC floor dropped from pinned0x47(DCS 7 / fabric 4, 8/8 samples,+900 mWover idle on stock7.3.0-aurora-j813-sgv2+) to0x01(DCS 1 / fabric 0, 14/14 samples,+99 to +141 mWover idle) — ~760–800 mW saved on light 60 fps GPU draw.vkcube --present_mode 0(1000‰): immediately lifted to0x47(5/5 samples) and returned cleanly to0x00on idle.20–70/sto0–8/s(0/swhen quiet);arch_timerdropped594/s -> 459/s; 0 failed units, 0 new kernel warnings/errors.tools/asahi/clpc-gpu-demand-tests.pyPASS (all T8142 DT negative controls + ladder checks),ARCH=arm64 LLVM=-19 W=1 drivers/soc/apple/clpc.o(0warnings),scripts/checkpatch.pl --strict(0/0/0).Risk: two-way door · T8142 Macs (J813/J815/J704).
Revert:
git revertthe two commits; restores the prior T8142 floor table and non-ladder GPU floor with no persistent state.Not yet: Standalone single-PR J813 boot without the two companion commits; live
low-powersysfs toggle (the J813 trial config hadCONFIG_ACPI/CONFIG_ACPI_PLATFORM_PROFILEdisabled); J815 and J704 runs (not on site).