Skip to content

arm64: dts: apple: t8132: give E and P cores their measured capacity - #393

Closed
erikwb wants to merge 1 commit into
aurora-silicon:m4/pr1-basic-bringupfrom
erikwb:j713/dts-cpu-capacity-v2
Closed

erikwb wants to merge 1 commit into
aurora-silicon:m4/pr1-basic-bringupfrom
erikwb:j713/dts-cpu-capacity-v2

Conversation

@erikwb

@erikwb erikwb commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Adds capacity-dmips-mhz to the T8132 CPU nodes: 1024 for the four Donan P cores, 754 for the six Donan E cores.

Without it every core reports cpu_capacity 1024, so the scheduler treats E cores as equal to P cores and puts latency-sensitive work (on J713, Hyprland's frame composition) on them. Omarchy's J713 session works around that by pinning the compositor to the P cores, which every app it launches inherits, so nproc reads 4 on the desktop.

Measurement

J713 (M4 MacBook Air, 10-core), this branch's kernel and cpufreq tables, schedutil, E max 2892 MHz, P max 4104 MHz. Twelve single-threaded programs (gcc -O2, zstd -19, bzip2 -9, gzip -9, xz -6, zlib, node, sqlite, perl, lua, two CPython loops), each pinned with taskset and run three times on two cores per cluster:

  • E/P wall-time ratio, geometric mean: 0.519 (range 0.39 to 0.67)
  • battery 0.523, AC 0.524
  • E = 0.519 × 4104 / 2892 × 1024 = 754, so E cpu_capacity = 531

Synthetic latency-bound loops (dependent ALU/FMA chains, L2 pointer chase) flatter the E cores (about 0.60), so they were left out. For comparison, t8112 uses 756.

Side note: on this tree scaling_cur_freq reports the requested P state. A dependent-add chain measures 3700 to 3930 MHz delivered while 4104 is requested, depending on how many P cores are busy. The ratio above is wall-clock, so it already reflects what's delivered.

Testing

Booted on J713 with the eryk3 DTB plus only these ten properties: cpu_capacity reads 1024 on cpus 0,7-9 and 531 on cpus 1-6, and with the pin gone the desktop runs smoothly on all ten cores.

Without capacity-dmips-mhz every T8132 core reports capacity 1024, so the
scheduler treats the Donan E cores as equals of the P cores and places
latency-sensitive work (Hyprland frame composition on J713) on them.

Measured on a J713 (M4 MacBook Air) running cpufreq with schedutil, E at
2892 MHz and P at 4104 MHz (cpuinfo maxima): twelve single-threaded
programs (gcc -O2, zstd -19, bzip2 -9, gzip -9, xz -6, zlib, node,
sqlite, perl, lua and two CPython loops), each pinned and run three times
on two cores per cluster. The E/P wall-time ratio has a geometric mean of
0.519 (0.39 to 0.67), the same on battery and on AC. arch_topology scales
capacity-dmips-mhz by each cluster's maximum frequency, so
E = 0.519 * 4104 / 2892 * 1024 = 754, giving E cores a capacity of 531.

Signed-off-by: Erik Bourget <[email protected]>
RyanTheTide added a commit that referenced this pull request Oct 24, 2026
arm64: dts: apple: t8132: give E and P cores their measured capacity

Erik Bourget's #393, re-landed on integration/aurora.
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks Erik. Since #400 replaced the m4/pr1-basic-bringup stack, I cherry-picked your commit unchanged onto integration/aurora as #416 (your authorship and sign-off kept) and merged it there as a47bf92. Closing this one as superseded by #416.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants