Repository navigation
arm64: dts: apple: t6031: add measured CPU energy model - #3854
Conversation
T6031's CPU OPP tables in t6031-base.dtsi (inherited by T6031 M3 Max, T6034 14-core M3 Max, and T6032 M3 Ultra die 0) carry no opp-microwatt, so no CPU energy model registers (/sys/kernel/debug/energy_model is empty), energy-aware scheduling stays disabled, and power_allocator has no CPU power actors. Add per-CPU opp-microwatt for all six Sawtooth E-core OPPs and all twenty Everest P-core OPPs, measured on a live J516C (16-inch, 16-core M3 Max) via SMC cluster power keys: PPMC for the 4-core E cluster (1020-2484 MHz, rms 4.9 mW; 2568 MHz hardware-capped at 2484 MHz power and extrapolated) and PC02+PC03 for the 6-core P0 cluster (2172-3420 MHz above the PC03 rail sensor floor and below the ~25.5 W PMP cluster cap, rms 40.2 mW; cross-checked against P1 PC42+PC43 within 1-3%; 3516-4056 MHz extrapolated). Both curves are strictly monotonic in power and in Linux's microwatt Energy Model integer cost (power * 10 / performance at cpu_capacity 550 and 1024), so no lower OPP is marked inefficient and every E-core OPP remains strictly cheaper per unit performance than the lowest P-core OPP. Signed-off-by: Marcelo Alcantara <maralc@gmail.com>
|
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.
🔵 Needs a closer look
Hardware-maintainer validation is needed for the extrapolated high-frequency power estimates because raw measurements and post-change scheduling and thermal runtime results are unavailable.
No open issues 🎉
What changed in this PR
Adds CPU power estimates to the shared T6031 device tree to support Linux Energy Model consumers on T6031, T6034, and T6032 die 0.
Changes:
- Adds
opp-microwattvalues for all 6 efficiency-core and 20 performance-core operating points. - Documents hardware measurements, curve fitting, and extrapolation for capped states.
| File | Description |
|---|---|
arch/arm64/boot/dts/apple/t6031-base.dtsi |
Adds per-CPU power curves and documents their measurement methodology. |
Review effort: Balanced
|
Hardware measurement note:
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Reviewed 33f85f4. The values follow the fitted curves, rise strictly per state, and every E state costs less than the lowest P state, so the Energy Model registers with no inefficient OPPs. T6032 die 1 has no opp-microwatt, so EAS stays off on M3 Ultra (perf domains without an EM disable it) while die 0 gets power actors; that is harmless.
Merge needs a boot of this DTB at this head on a T6031 Mac, since the comment on the PR says the lab runs kept the old boot.bin: /sys/kernel/debug/energy_model populated for both clusters, sched_energy_aware on, a short idle and load check with no new kernel warnings.
|
Merge status: one item left, a T6031 boot with this DTB. The change is approved, and its merge into current To close it, please boot an M3 Max (the J516C is fine) with a DTB built from this PR, installed with
One boot of a DTB that carries this PR, #3855 and #3856 unchanged counts for all three. Local checks on the merge result (hosted CI stand-in)
|
|
Merging at |
Summary
t6031-base.dtsi(inherited by T6031 16-core M3 Max, T6034 14-core M3 Max, and T6032 M3 Ultra die 0) carries noopp-microwatton its CPU OPP tables, leaving/sys/kernel/debug/energy_modelempty, energy-aware scheduling disabled, andpower_allocatorwithout CPU power actors.Add hardware-measured per-CPU
opp-microwattcurves for all 6 Sawtooth E-core OPPs (1020–2568 MHz) and all 20 Everest P-core OPPs (1092–4056 MHz), measured on a live 16-inch M3 Max (J516C, T6031) via SMC cluster power keys:sawtooth_opp, 4 cores,PPMCdelta / 4): fitted across uncapped1020–2484 MHz(ln(P/mW) = 4.733 + 1.244 ln f + 0.710 (ln f)^2, RMS4.9 mW), extrapolated to hardware-capped2568 MHz(116–691 mW/core).everest_opp, 6 cores,PC02+PC03delta / 6, cross-checked against P1PC42+PC43within 1–3%): fitted across2172–3420 MHz(above thePC03rail floor and below the~25.5 WPMP all-core cap, constrained tob >= 1,ln(P/mW) = 6.029 + 1.020 ln f + 0.690 (ln f)^2, RMS40.2 mW;41.0 mWacross all 12 uncapped states1092–3420 MHz), extrapolated to3516–4056 MHz(457–6695 mW/core).power * 10 / performance,cpu_capacity550 / 1024): E costs rise strictly5,321 → 12,563, P costs rise strictly16,618 → 65,380(zero inefficient OPPs, and every E OPP strictly cheaper than the lowest P OPP).Tested: MacBook Pro 16-inch (M3 Max, J516C, T6031) at 33f85f4 (live SMC power sweep across all 6 E-cluster OPPs, all 20 P0-cluster OPPs, P0 1-core top OPPs, and P1 6-core spot checks; ARM64 kernel + DTB build b1202-103918-3651 and all 5 board DTBs
t6031-j514c,t6031-j516c,t6034-j514m,t6034-j516m,t6032-j575dcompile with zero new warnings; checkpatch--strictclean; Codex review VERIFIED01a23427-73a4-75d1-b4e9-39a20be8b9c5).Risk: two-way · T6031/T6034/T6032 die-0 CPU Energy Model (
opp-microwattint6031-base.dtsi)