Skip to content

accel/ane: keep the CPU boost when no performance controller is bound - #718

Merged
RyanTheTide merged 1 commit into
aurora-wipfrom
ane/keep-boost-without-perf-controller
Oct 31, 2026
Merged

RyanTheTide merged 1 commit into
aurora-wipfrom
ane/keep-boost-without-perf-controller

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Keeps the engine-busy CPU frequency boost when the DT binds no ANE performance controller.

#684 replaced the boost with a PMP level request, but only DTs with apple,performance-controller on the ANE node and the ane-dvfs window on pmp_report get a level. T8103 and every machine still booting an older DTB set (our ref Macs boot the 7.1 set from boot.bin) lost the boost and got nothing in its place.

Measured on the M1 Pro at the default ANE clock, boost on vs off, 2000 submits per run, two interleaved rounds:

layer p50 on p50 off p99 on p99 off
1x1 512->512 @14 123.1 us 126.4 us 129.5 us 135-136 us
1x1 128->128 @56 108-110 us 111-112 us 115-119 us 117-138 us
dw 3x3 64 @112 201-204 us 204 us 207-209 us 245-364 us

With this change a DT without a controller gets the old min-frequency QoS around each submit. A DT with one gets the level request and no boost, exactly as #684 does now. No module parameter decides it, only the DT. performance_level still reads unsupported on those machines.

KUnit x86_64/arm64 for the ANE and PMP suites pass, except 3 ane-h16-hwx subtests that fail the same way on aurora-wip. Checkpatch strict is clean apart from the MAINTAINERS note for the restored file (drivers/accel/ane/ is already covered).

🤖 Generated with Claude Code

The performance-request rework replaced the engine-busy CPU frequency
boost with a PMP level request, but only a DT that names
apple,performance-controller (and a pmp_report with its ane-dvfs
window) gets a level. Everything else, T8103 and every machine still
booting an older DTB set, lost the boost and gained nothing.

On the M1 Pro at the boot ANE clock the boost is worth 1 to 3 % at p50
on single layers and mostly protects the tail: a 3x3 depthwise layer
at 112x112 goes from 207 us p99 with the boost to 245-364 us without
it, over 2000 submits.

Bring the boost back for exactly that case. When the DT binds no
performance controller, ane_perf_init sets up the same min-frequency
QoS as before and ane_perf_begin/end drive it around each submit. A DT
with a controller gets the level request and no boost, as before.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

M1 Pro check, 7.3.0-aurora-fleet12g-ane (aurora-wip aa07c00 + #717 + this), 7.1 DTB set from boot.bin:

  • dmesg no performance controller; keeping the CPU frequency boost, performance_level reads unsupported, performance_error 0.
  • During a MobileNetV1 run the cpufreq policies' scaling_min_freq go to 2064000/3036000/3036000, and back to 600000 about 100 ms after the last submit.
  • MobileNetV1 224 linked (PR drm/apple: don't latch ->crashed when the poweroff clear swap times out #5 compiler, real weights), 1000 passes after 20 warmups: p50 2.270 ms / p99 2.305 ms with I/O (440 inf/s), exec only p50 2.250 ms / p99 2.261 ms, busy 2.237 ms. Same as fleet12e.
  • arm64 W=1 clean for drivers/accel/ane and drivers/pmdomain/apple.

One more reason to keep the boost where there's no level: lane A's bisect tonight found that with the boost off (boost_idle_ms=0), linked streams that include the 112x112 layers hit -5, finish lines=0 task errors at a steady rate over 5000 passes, and none with the boost on (10,000 passes clean). That looks like a low fabric clock rate effect, still under investigation on the compiler side.

@RyanTheTide
RyanTheTide marked this pull request as ready for review October 31, 2026 15:41
@RyanTheTide
RyanTheTide merged commit 9ed109d into aurora-wip Oct 31, 2026
@RyanTheTide
RyanTheTide deleted the ane/keep-boost-without-perf-controller branch October 31, 2026 15:41
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