Repository navigation
accel/ane: add scoped PMP levels and bandwidth-vote infrastructure - #684
Conversation
Describe the optional shared PMP clock controller and an interconnect path with OPP bandwidth requirements. Keep controller register ownership in the PMP provider. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Request the T600x high clock level for work and release it after a short idle interval. Serialize the PMP request bit with power-domain users, retain runtime PM references through failed rollback, and release before suspend or recovery. Replace CPU frequency QoS with an optional interconnect bandwidth request from DT OPP data. Report unsupported paths explicitly; this does not supply a T600x DCS transport. Add register-model KUnit coverage and read-only performance diagnostics. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Describe the ANE DVFS window on the shared PMP report provider and keep its SRAM powered while the ANE holds a level request. Leave other SoC layouts untouched. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Capture workload output, whole-system power and idle recovery without changing driver policy. Identify EACCES and EPERM by device path and owning group. Mark short load samples as insufficient for a power comparison. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
Do not discard the report node or detach power domains after an idle release fails during removal. Keep the same conservative retention rule used for an engine with unknown DMA state, and make the failed teardown visible. Normal removal releases votes before reclaiming buffers. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
The parent Makefile enters drivers/pmdomain only when generic power domains are enabled. Make that requirement explicit for the standalone ANE register-model suite so enabling its option actually builds it. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
|
M1 Pro (T6000, J316s) measurements against this PR, kernel 7.3.0-aurora-fleet12e (no #684 yet), default ANE clock. Level 5 was not measured. This PR only requests a level when What the CPU boost is worth today, three single-layer programs, 2000 execs each, two interleaved rounds,
So on T6000 the boost buys 1 to 3 % at p50 and mostly protects the tail (dw 64 @112 p99 goes from 207 us to 245-364 us without it). Engine busy time barely moves, the difference is submit-side wakeup latency. Removing it here without a level request in its place is a small p50 loss and a real p99 loss. Whole-system power with the boost on, 40 s loop of the 1x1 128 @56 program (about 8,700 execs/s), was 8.8 W against 4.3 W idle. The boost-off power runs were contaminated by other CPU work on the machine and I'm not quoting them. The Suggestion for the draft: keep the CPU QoS path as the fallback when no performance controller is bound (or when the request fails), and drop it only on machines that actually get a level. That avoids a regression on every DT that hasn't picked up the new properties yet. |
The PMP report probe now maps an optional ANE DVFS window and apple_pmp_report_set_state() refuses a reserved ANE domain. The T6030 graph test compiles those bodies verbatim, so it stopped building. Mirror struct apple_pmp_ane in the fixture and add the platform resource helpers the probe calls. T6030 reports never name an ane-dvfs window, so of_property_match_string() reports no match and the resource helpers assert if they are ever reached. Assisted-by: LLM Signed-off-by: Ryan Murray <[email protected]>
ANE submission currently raises every CPU cluster's minimum frequency, while H13 ANE clocks stay at their boot policy. This draft replaces that CPU QoS code with workload-scoped T600x PMP level requests and an optional DT/OPP interconnect bandwidth consumer. Level 5 is selected from match data while work is active; requests release after 32 ms idle. Read-only sysfs reports the requested level, requested bandwidth and transition errors.
The PMP provider owns both register windows and serializes ANE_SYS with its existing power-domain users. Existing owners are rejected before DVFS writes. Runtime PM references cover requests and failed rollback; suspend and recovery release requests before gating. The level sequence uses the public dual-licensed omarchy-ane implementation.
This remains draft: T600x has no exported host DCS interconnect provider in this tree. Its GPU firmware receives PMP windows, while the exported PMC voter interface is for a different SoC generation. This patch does not invent a T600x memory-vote transport:
memory_voteexplicitly reportsunsupporteduntil one is supplied. Removing CPU boosting can regress bandwidth-bound programs without that provider, especially on T8103. A verified shared DCS provider and paired M1 Pro latency/power measurements are required before merging. H14 firmware performance control is unchanged.tools/accel/ane-bench.pycollects an installed workload's output, whole-system power and idle recovery. Its access preflight distinguishes EACCES/EPERM from a missing device and names the owning group. Short load captures are marked insufficient for a power comparison.Validation so far: four native register-model cases, seven provider integration checks, Python byte-compilation and injected permission/missing-device errors pass. All six commits pass strict checkpatch with zero errors, warnings or checks. Four additional removal-path model checks pass, including retaining the report and power-domain attachments after a failed release. Final-head ARM64 objects/DTBs, hardware-free UML KUnit, and binding validation are queued on the build host. Target smoke, paired latency/power and suspend/recovery validation remain outstanding.