Skip to content

arm64: dts: apple: t8140-j700: keep the idle E cluster out of its lowest OPP - #214

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
j700/e-cluster-thermal
Oct 9, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
j700/e-cluster-thermal

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The J700 (MacBook Neo, T8140) thermal zones use the power allocator governor. The 58 C switch-on trip and the
95 C control trip are explained in the comment above thermal-zones.

The governor grants no power to a cooling device that requests none. Above the switch-on trip it therefore caps an
idle E cluster at its lowest OPP (816 MHz). Work that then wakes on an E core runs at 816 MHz until the next
evaluation, up to 500 ms later.

With the schedutil governor the die idles below the switch-on trip, so this does not happen. With the performance
governor, for example tuned's throughput-performance profile, the die idles just above it, and the E cluster
spends a large part of idle time capped.

This patch stops the E-cluster cooling maps at state 3 (1464 MHz) in all six zones:

  • The energy model puts the cost of the cluster's work at 1464 MHz within 0.5% of 816 MHz.
  • With the P cluster at its lowest OPP, the lowest power the governor can force on both clusters is 0.73 W. That is
    well under the 1.1 W sustainable on floating-point loads that the existing comment documents, so the governor keeps
    the authority it needs.
  • Under all-core load the E cluster is not throttled anyway: its 3:1 weight keeps it at full speed while the P cores
    are trimmed.

The trips, sustainable power and weights are unchanged. I chose not to raise the switch-on trip above the
performance-governor idle temperature: that changes the derived PID gains, and keeping them would mean lowering
sustainable-power, which costs sustained performance.

Measurements

Hardware: MacBook Neo (J700), with the same boot loader and device tree on every boot below.

  • Before: the Neo's default kernel.
  • After: the same source plus this patch, booted once and then removed.
  • How the DT change was applied: the J700 takes its DTB from the boot loader, so the one-shot test kernel applied
    this patch's cooling-map values to the live tree at boot (subsys_initcall, before the thermal zones register).
    /sys/firmware/devicetree showed <cpu 0xffffffff 3> in all six E maps. The DTB built from this branch is
    byte-identical to the one the test kernel was built with (sha256 793bfcce…), and it carries the same values.
  • Method: sysfs sampled at 2 Hz, cpufreq time_in_state deltas, the thermal:cdev_update and
    thermal_power_allocator trace events, and SMC power keys.
  • Workload: the "E bursts" are 120 bursts, each 300k integer-loop iterations pinned to an E core, after a 1 s idle
    gap. The load is 6 pinned Python integer-loop workers.

Idle for 10 minutes, throughput-performance (performance governor). Display off in both runs.

Before After
Hottest CPU sensor, min / mean / max 58.4 / 59.4 / 60.2 C 60.1 / 60.6 / 61.1 C
Allocator zone evaluations 2223 2344
E actor granted 0 mW 807 (36%) 463 (20%)
E cooling-device state (samples) 0: 60.5%, 1: 0.1%, 5: 39.4% 0: 73.4%, 3: 26.6%, never above 3
E-cluster time_in_state 816 MHz: 39.6%, 2424: 60.3% 1464 MHz: 27.0%, 2424: 73.0%
P-cluster rail (SMC PP0b) 1.206 W 1.214 W
E-cluster rail (SMC PPbb) 11 mW 13 mW
E bursts: median / p90 / max 38.1 / 108.1 / 113.6 ms 35.2 / 57.9 / 60.9 ms
Bursts that started capped 35 of 120, at 816 MHz (107–114 ms each) 16 of 120, at 1464 MHz (≤ 61 ms)

Idle, balanced (schedutil), now the default profile on this machine.

Before (8 min, display off) After (10 min, display on at the start)
Hottest CPU sensor, min / mean / max 40.6 / 41.6 / 49.3 C 42.3 / 43.5 / 45.4 C
Allocator zone evaluations 0 0
E cooling-device state 0 (100%) 0 (100%)
E bursts: median / p90 / max 40.4 / 42.4 / 46.2 ms 42.8 / 43.6 / 58.1 ms

All-core load for 10 minutes, 6 workers, balanced.

Before (display on) After (display off)
Hottest sensor, mean / peak 89.8 / 95.6 C 89.9 / 93.9 C
First 60 s: mean P clock, peak 1813 → 1486 MHz, 93.4 C 1823 → 1521 MHz, 93.9 C
E cluster 2424 MHz for 100% of samples, state 0 2424 MHz for 100% of samples, state 0
P cluster settles at 1260 MHz (76% of samples) 1260–1620 MHz (54% / 37%)
Work rate, total of 6 workers 2731 units/s 2826 units/s
After the load below 55 C within 25 s below 55 C within 25 s

What the numbers show:

  • The patch removes the 816 MHz cap from the idle E cluster under the performance governor. Short work that lands
    there never runs below 1464 MHz, and the worst burst falls from 114 to 61 ms.
  • Idle rail power is unchanged.
  • With schedutil the governor stays off at idle, both before and after.
  • Under sustained load, behaviour is the same: the E cluster is never capped, and the P cluster trims to
    1260–1620 MHz.
  • No run reached the 95 C control trip for more than a moment, nothing aborted, and there was no runaway.

Confounds. The before and after runs differ in battery vs AC power and in display state, as marked in the tables.
The 1–2 C differences are within the spread between boots.

Testing

  • Builds, and t8140-j700.dtb compiles. The DTC messages for this DTB are the same pre-existing t8140.dtsi /
    isp-common.dtsi warnings as on the base.
  • The compiled DTB carries <&cpu_eN 0xffffffff 3> in all six E maps.
  • scripts/checkpatch.pl --strict reports nothing apart from the expected warning about the Assisted-by trailer
    format.
  • No bindings change, so dt_binding_check does not apply.

Provenance

This is new, written from the in-tree power allocator source (divvy_up_power(), power_actor_set_power()), the
J700 DT and its energy model, and Linux-side measurements.

🤖 Generated with Claude Code

…est OPP

The power allocator grants no power to a cooling device that requests
none. Above the 58 C switch-on trip it therefore caps an idle E cluster
at its lowest OPP, 816 MHz, and work that wakes there runs at that speed
until the next evaluation, up to 500 ms later. With the performance
cpufreq governor the J700 die idles at 58-70 C, above that trip: in a
ten-minute idle the E cooling device sat at state 5 in 39% of the
samples, and 35 of 120 short E-core bursts started capped and took
107-114 ms instead of 36 ms.

Stop the E-cluster cooling maps at state 3, 1464 MHz. The energy model
puts the cost of the cluster's work there within 0.5% of 816 MHz, and
with the P cluster at its lowest OPP the floor of both clusters is
0.73 W, well under the 1.1 W sustainable on floating-point loads, so
the governor keeps the authority it needs.

With this change the same idle never takes the E cluster below
1464 MHz and the slowest burst takes 61 ms, with the P-cluster rail
unchanged at 1.21 W. With schedutil the die idles at 41-49 C and the
governor never runs, before or after. A ten-minute all-core load keeps
the E cluster at 2424 MHz throughout either way, since its weight makes
the governor trim the P cores; the P cluster settles at 1260-1370 MHz
and the hottest sensor peaks at 93.9 C (95.6 C before).

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide merged commit aba98cc into aurora-wip Oct 9, 2026
@DjDeveloperr
DjDeveloperr deleted the j700/e-cluster-thermal branch October 12, 2026 19:14
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.

1 participant