Repository navigation
arm64: dts: apple: t8140-j700: keep the idle E cluster out of its lowest OPP - #214
Merged
Merged
Conversation
…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]>
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.
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-performanceprofile, the die idles just above it, and the E clusterspends a large part of idle time capped.
This patch stops the E-cluster cooling maps at state 3 (1464 MHz) in all six zones:
well under the 1.1 W sustainable on floating-point loads that the existing comment documents, so the governor keeps
the authority it needs.
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.
this patch's cooling-map values to the live tree at boot (
subsys_initcall, before the thermal zones register)./sys/firmware/devicetreeshowed<cpu 0xffffffff 3>in all six E maps. The DTB built from this branch isbyte-identical to the one the test kernel was built with (sha256
793bfcce…), and it carries the same values.time_in_statedeltas, thethermal:cdev_updateandthermal_power_allocatortrace events, and SMC power keys.gap. The load is 6 pinned Python integer-loop workers.
Idle for 10 minutes,
throughput-performance(performance governor). Display off in both runs.time_in_stateIdle,
balanced(schedutil), now the default profile on this machine.All-core load for 10 minutes, 6 workers,
balanced.What the numbers show:
there never runs below 1464 MHz, and the worst burst falls from 114 to 61 ms.
1260–1620 MHz.
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
t8140-j700.dtbcompiles. The DTC messages for this DTB are the same pre-existingt8140.dtsi/isp-common.dtsiwarnings as on the base.<&cpu_eN 0xffffffff 3>in all six E maps.scripts/checkpatch.pl --strictreports nothing apart from the expected warning about theAssisted-bytrailerformat.
dt_binding_checkdoes not apply.Provenance
This is new, written from the in-tree power allocator source (
divvy_up_power(),power_actor_set_power()), theJ700 DT and its energy model, and Linux-side measurements.
🤖 Generated with Claude Code