Repository navigation
soc: apple: clpc: step T8132 CPU memory floor and require busy streak - #3545
Conversation
T8132 currently votes top DCS 5 / fabric 3 on the very first busy CPU
sample at any frequency, including a single low-clocked E-core or brief
interactive bursts. On J713, a single E-core at 900 MHz draws 9 mW on
its own rail while holding DCS 5 / fabric 3 adds ~630-775 mW of system
power.
Replace the flat {5, 5, 5, 5} / {3, 3, 3, 3} T8132 CPU table with a
stepped quartile ladder ({1, 2, 4, 5} DCS, {0, 0, 1, 3} fabric) and a
three-sample (12 ms) busy streak, matching the T6040 streak filter.
Top-quartile CPU work and GPU demand still request DCS 5 / fabric 3.
Signed-off-by: Erik Bourget <erik@ebourget.net>
There was a problem hiding this comment.
Verdict: MERGE at 047f6b5e
Blockers: none (wait for the queued CI checks at 047f6b5e to finish green before merging; note that if combined with #3491, t8132_from_dt() in tools/asahi/clpc-gpu-demand-tests.py will need its expected CPU map updated).
Checked:
drivers/soc/apple/clpc.c: replaces the flat{5, 5, 5, 5}/{3, 3, 3, 3}(sustain = 0) T8132 CPU table with a stepped quartile ladder ({1, 2, 4, 5}DCS,{0, 0, 1, 3}fabric) and.sustain = 3(12 ms), matching T6040/T6050.- Verified
apple_clpc_gpu_input_demand()readshw->map[rail][APPLE_CLPC_LEVELS - 1](5DCS /3fabric), so host-reported GPU floor behavior is unchanged when no DT busy-share ladder is present. - KUnit (
apple_clpc_t8132_gpu_input_test) andtools/asahi/clpc-gpu-demand-tests.py(check_t8132) both updated to assert the stepped map andsustain == 3; both host CLPC suites andcheckpatch.plpass cleanly. - Exact-head J713 M4 Air same-machine A/B at
047f6b5e17c2saves-586 mWPSTR on 30% P-core bursts,-503 mWon 3.8 V rail at 65% E-core 900 MHz, cuts 1080p60 AVD0x35spikes64% -> 5%, with nomembwregression (96.51vs95.26 GB/s) and 0 failed units. - Checked for Apple material, tool attribution, and private serials: clean;
MERGEABLEonmain; humanSigned-off-by;Tested:andRisk: two-way doorpresent.
Evidence
- Head:
047f6b5e(base: main,mergeable: MERGEABLE,+28/-8across 2 files). - Inspected
drivers/soc/apple/clpc.c(apple_clpc_hw_t8132,apple_clpc_gpu_input_demand,apple_clpc_t8132_gpu_input_test) andtools/asahi/clpc-gpu-demand-tests.py. - Hosted CI at
047f6b5eis currently queued.
|
code-owner ping <@422957901716652033> / @DjDeveloperr: merge train at |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Merging under the 6-point rule (Ryan 09:29, permanent), at |
What: Replace the flat
{5, 5, 5, 5} / {3, 3, 3, 3}(sustain = 0) T8132 CPU CLPC table with a stepped frequency-quartile ladder ({1, 2, 4, 5}DCS,{0, 0, 1, 3}fabric) and a 3-sample (12 ms) busy streak matching T6040, so low-clocked E-core activity and brief interactive bursts stop pinning top DCS 5 / fabric 3 voltage states while peak CPU and GPU workloads keep full bandwidth.Tested: J713 M4 Air at
047f6b5e17c2(unchanged patch on J713 trial build, default command line): boots cleanly, 0 failed units, 0 new kernel errors; same-machine A/B saves-586 mWPSTR on 30% P-core bursts (floor 0x3537/50 → 0/50),-503 mW3.8 V rail on 65% E-core @ 900 MHz (floor 0x3550/50 → 0/50), cuts 1080p60 AVD video0x35spikes64% → 5%, with sustained 4-threadmembwat96.51 GB/s(baseline95.26 GB/s, no regression).Risk: two-way door · M4 (T8132) Macs
Not yet: Other T8132 boards (J604, J623, J624, J715, J773g) have not been run on hardware yet; when combined with #3491,
t8132_from_dt()intools/asahi/clpc-gpu-demand-tests.pyneeds its expected CPU map updated from flat to stepped.Details
Previously,
apple_clpc_hw_t8132mapped every CPU frequency quartile to DCS 5 / fabric 3 with.sustain = 0. Any single 4 ms sample above 50% busy on either cluster raised both memory and fabric rails to their maximum states for at leastAPPLE_CLPC_HOLD_MS(32 ms). On J713, a single E-core at 900 MHz draws ~9 mW onPPbbwhile the resulting0x35floor added ~630–775 mW of system power.This change:
apple_clpc_hw_t8132.mapacross the four frequency quartiles:q = 0(< 25%max, P 912 MHz): DCS 1 / fabric 0q = 1(25–49%, E 900–1080 MHz, P 1260–2088 MHz): DCS 2 / fabric 0q = 2(50–74%, E 1476–1860 MHz, P 2352–3300 MHz): DCS 4 / fabric 1q = 3(>= 75%, E 2172–2892 MHz, P 3468–4464 MHz): DCS 5 / fabric 3.sustain = 3(three consecutive busy samples, 12 ms), matchingapple_clpc_hw_t6040andapple_clpc_hw_t6050so brief background and interactive bursts do not trigger memory rail ramps.drivers/soc/apple/clpc.candcheck_t8132()intools/asahi/clpc-gpu-demand-tests.py.Evidence
Host checks (
047f6b5e17c2)python3 tools/asahi/clpc-gpu-demand-tests.py: PASS (all positive cases and negative controls)python3 tools/asahi/clpc-high-power-cleanup-tests.py: PASS./scripts/checkpatch.pl --no-tree: 0 errors, 0 warningsJ713 M4 Air same-machine A/B (default command line)
M5/F3,sustain=0)047f6b5e17c2(stepped +sustain=3)+875 mWover idle (0x3547/50)+289 mWover idle (0x0048/50)-586 mWPSTR+630 mWover idle (0x3550/50)+127 mWover idle (0x0044/50,0x024/50)-503 mW3.8 V0x3538/50 (+559 mW3.8 V over idle)0x0047/50 (+24 mW3.8 V over idle)-535 mW3.8 V0x3548/75 (64%)0x0255/60 (92%),0x353/60 (5%)SoC 3spikes eliminatedmembw1-thread (40×64 MB)52.60 GB/s54.11 GB/s+2.9%membw4-thread sustained (120×64 MB)95.26 GB/s96.51 GB/s+1.3%Boot regression check on J713:
renderD128present,0failed systemd units,9error-level dmesg lines (identical to baseline).