Repository navigation
T8132: add the CPU energy model (enables EAS on M4) - #524
Merged
RyanTheTide merged 1 commit intoOct 27, 2026
Merged
RyanTheTide merged 1 commit into
RyanTheTide merged 1 commit into
Conversation
Add opp-microwatt to every OPP of both T8132 (M4) CPU clusters, so the OPP core registers an energy model and the scheduler can use energy-aware placement. Without it, EAS stays off on T8132 even though the cpufreq driver already registers the model from the OPP table. The values were measured on a MacBook Air (J713) with the method used for T8140: one busy core per cluster at each operating point, pinned with scaling_min/max_freq, read from the SMC core-rail power meters. - P cluster: PP0b with one busy core. The rail voltage steps with the P-state (584 mV at 912 MHz) and no other rail rises with the load. Each point is the mean of three runs (within 2%), with the top points measured from a die below 55 C. - E cluster: PPbb idle plus a sixth of the rise with all six cores busy, as PPbb does not register a single busy core. Below 1476 MHz it does not register six either; the 900 and 1080 MHz values use the measured rail voltage and the cluster's dynamic coefficient fitted from 1476-2892 MHz (72 mW per GHz V^2, within 6% at each measured point). - 4416 and 4464 MHz are turbo states, measured with boost enabled. With one busy core, 4044 and 4104 MHz run no faster than 3984 MHz, and 3876 MHz draws more than 3936 MHz. The energy model marks these states inefficient and cpufreq skips them. On J713 with this model, a medium background load (four threads at 30% duty) stays on the E cluster with EAS, instead of reaching the P cluster 3-9% of the time without it, and uses 20-57 mW less system power. Signed-off-by: Erik Bourget <[email protected]>
erikwb
pushed a commit
to erikwb/linux
that referenced
this pull request
Oct 28, 2026
Brings the J616s batch5 kernel (the tree running on the M4 Pro) up to the current integration/aurora, which adds aurora-silicon#524 (J713 T8132 energy model), aurora-silicon#526 (the T6041 display fabric carry, whose peer allocation field group batch5 already has) and aurora-silicon#529 (J713 USB-C idle power). Conflict resolution: - selftests apple-dcp rate.py: keep batch5's version. Its fixtures follow aurora-silicon#451's desktop adaptive sync and the T6041 external EDID. The integration/aurora side only changed how the lookup_mode() definition is found; its line-start pattern also matches the indented "lookup_mode(dcp, ..." call that batch5's iomfb.c has before the definition, while batch5's 'bool lookup_mode(' marker finds the definition in either form. aurora-silicon#529's ATC and dwc3 changes merge cleanly beside aurora-silicon#516's two-lane DP pin D. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T8132 (M4) has no CPU energy model, so energy-aware scheduling stays off even though
apple-soc-cpufreqalready registers the model from the OPP table. This adds measuredopp-microwattvalues to every OPP of both clusters, like T8103/T600x, T8112 and T8140.Method (J713, MacBook Air 13" M4)
Following the T8140 method: one busy core per cluster at each operating point, pinned with
scaling_min/max_freq, read from the SMC core-rail power meters.PP0bwith one busy core. Its voltage steps with the P-state (584 mV at 912 MHz) and no other rail rises with the load. Each value is the mean of three runs, all within 2%. The top states were measured from a die below 55 C.PPbbidle plus a sixth of the rise with all six cores busy, becausePPbbdoes not register a single busy core. Below 1476 MHz it does not register six either. The 900 and 1080 MHz values use the measured rail voltage (584 and 609 mV) and the cluster's dynamic coefficient fitted over 1476-2892 MHz: 72 mW per GHz·V², within 6% at every measured point.With one busy core, 4044 and 4104 MHz run no faster than 3984 MHz (same throughput on a fixed integer loop), and 3876 MHz draws more than 3936 MHz. The energy model marks these states inefficient, and cpufreq skips them.
Result
EM: created perf domain), and the scheduler starts EAS for the root domain:pd1:{ cpus=1-6 nr_pstate=8 } pd0:{ cpus=0,7-9 nr_pstate=20 }.kernel.sched_energy_aware1 vs 0, on battery, display on:--strictis clean.CHECK_DTBS+ W=1 for all six T8132 boards show no new warnings againstintegration/aurora.This change was developed and tested by Claude (Anthropic), working with me on the J713.