Repository navigation
soc: apple: clpc: hold P-cluster frequency floor for ANE on T8142 - #3009
Merged
RyanTheTide merged 1 commit intoNov 23, 2026
Merged
RyanTheTide merged 1 commit into
RyanTheTide merged 1 commit into
Conversation
Once the T8142 engine AXI2AF bridge tunables are applied, pure ANE execution time on T8142 also depends on the P-cluster frequency (cpu-map cluster1), independent of which CPU cluster submits the request. Measured on J813 (MacBook Air 13" M5, T8142; J815 and J704 share the compatible) pinned to an E-core with the DCS 7 / SOC 3 floor active, unet-320 firmware report_done drops from 660.5 us with no P-cluster floor to 350.7 us at 4176 MHz (host p50 954.4 us -> 616.5 us, 4.49 W average), with no further reduction at 4464 MHz (363.0 us, 5.31 W). Enable the existing CLPC ANE cluster frequency floor on apple_clpc_hw_t8142 for cluster 1 at 4176000 kHz, matching all T8142 machines via "apple,t8142" as required by the current apple_clpc_probe() check (no single-board gating; can move to apple,ane-cpu-opp once aurora-silicon#2856 lands). Extend apple_clpc_ane_cluster_test accordingly. Signed-off-by: Bartosz Nitka <niteria@gmail.com>
niteria
force-pushed
the
t8142/clpc-ane-cluster-floor
branch
from
November 23, 2026 20:18
962d6fa to
b4ecd93
Compare
niteria
marked this pull request as ready for review
November 23, 2026 20:18
DjDeveloperr
approved these changes
Nov 23, 2026
DjDeveloperr
left a comment
Contributor
There was a problem hiding this comment.
Formal §1–§6 pre-PR checklist review at b4ecd93a595e99af22609c42d3c3be398a4ab557 (APPROVE).
Technical & Checklist Audit (§1–§6)
- §1 (No single-board gating): Enables
.ane_cluster = 1,.ane_cluster_khz = 4176000,.ane_cluster_machine = "apple,t8142"onapple_clpc_hw_t8142, matching all T8142 boards (j813,j815,j704) as required by the currentapple_clpc_probe()of_machine_is_compatible()check, with rationale explicitly documented in the commit message and a clear migration path to DT-drivenapple,ane-cpu-opponce #2856 lands. Ont8142-j704.dts(which does not yet define/cpus/cpu-map),apple_clpc_cluster_cpu(1)returns-ENODEVand cleanly no-ops untilcpu-mapis added. - §2–§3 (Correctness, bounds, lifetime, safety):
4176000 kHzis a valid OPP inpcluster_oppacross T8142 (opp-4176000000, level 14, below the4464 MHztop OPP), and thermal / Low PowerFREQ_QOS_MAXlimits still overrideFREQ_QOS_MIN.- Reuses the existing
apple_clpc_ane_cluster()path undersample_lock: lazycpufreq_cpu_get()/cpufreq_cpu_put()(no pinned policy ref),CPUFREQ_REMOVE_POLICYcleanup inapple_clpc_policy_notify(), non-deferrable sampling whileane_qos_khz != 0so the floor always drops afterAPPLE_CLPC_HOLD_MS, and guaranteed release inapple_clpc_halt()on suspend/remove.CONFIG_CPU_FREQ/CONFIG_PM/=m/=ybuildability and non-T8142 SoCs are unaffected. - Interaction with #3006: Putting the ANE CPU cluster floor in
clpc.c(and migrating toapple,ane-cpu-oppvia #2856) is the right architecture: it holds the measured power-optimal knee OPP (4176 MHz,4.49 W) rather than blindly pinningpolicy->cpuinfo.max_freq(4464 MHz,5.31 W, no latency gain), and avoids duplicatingfreq_qoslifecycle management inane_t6021. (Do not enable both #3009 and #3006 on the same SoC, or #3006'smax_freqrequest will override CLPC's4176 MHzknee.)
- §4 & §6 (Clean-room, attribution, naming): Commit
b4ecd93a595ecarries human author/committer (Bartosz Nitka <niteria@gmail.com>) and humanSigned-off-by:only (zero AI trailers); PR body carriesAssisted-by:; clean-room measured frequency/power sweep; clean naming. - §5 (Evidence): Strong J813 hardware evidence: 8-point P-cluster frequency/power sweep pinned to E-core
cpu2(report_done 660.5 -> 350.7 us, host p50954.4 -> 616.5 us,4.49 Wknee vs4464 MHz363.0 us / 5.31 W), fabric A/B confirming DCS 7 / SOC 3, clean idle release (0x00000000,policy0/1 min=300000,update errors: 0), 30 s deep sleep/resume survival,0 failed systemd units, and0 new CLPC/kernel errors. - Live CI: All 7/7 checks green (
host-tests,source,rust-build,kunitincluding updatedapple_clpc_ane_cluster_test, and 3×DWC3/ATC).
Non-blocking notes
- For §5 completeness, please record the exact kernel/build ID and SELinux status (
0 SELinux denials, orN/Aif running a non-SELinux userspace) on the J813 run. - Note that the J813 sweep was measured paired with #3008 (which currently needs a DT-driven tunable respin); #3009 is safe standalone, though the full latency win depends on the companion bridge-tunable fix landing.
Assisted-by: LLM (Gemini 4 Neon)
RyanTheTide
merged commit Nov 23, 2026
6f10822
into
aurora-silicon:integration/aurora
7 checks passed
Contributor
Author
|
Thanks for the review. Recording the §5 metadata for the J813 test run:
Updated the PR description to include these as well. Assisted-by: LLM (Gemini 4 Neon) |
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.
Problem
Once the T8142 engine AXI2AF bridge tunables (#3008) are applied, pure ANE execution time on T8142 still depends strongly on the P-cluster frequency (
cpu-mapcluster1), independent of which CPU cluster submits the request. Pinning submission to an E-core with the DCS 7 / SOC 3 floor active leavesunet-320firmwarereport_doneat660.5 us(host p50954.4 us) when no P-cluster floor is held.Change
apple_clpc_hw_t8142for cluster 1 at4176000 kHz, matching all T8142 machines via"apple,t8142"as required by the currentapple_clpc_probe()check (covers J813, J815, and J704 without single-board gating; can migrate toapple,ane-cpu-opponce soc: apple: clpc: hold the M4 (T8132) memory, fabric and P-cluster floors for ANE work #2856 lands, and is independent of accel/ane: hold performance-domains CPU cluster while requests run #3006).apple_clpc_ane_cluster_testto assert the T8142 configuration.Thanks to @satchlj for independently confirming the same bridge-tunables plus CPU cluster hold split on T6050 (J775c).
Testing
./scripts/checkpatch.pl --strict --no-signoff -g origin/integration/aurora..HEAD— 0 errors, 0 warnings, 0 checks (25 lines checked).tools/asahi/run-host-tests.py --only clpc— 3/3 passed (clpc-gpu-demand-tests,clpc-high-power-cleanup-tests,--old-ref).apple-clpc-gpu11/11 passed (including updatedapple_clpc_ane_cluster_test).7.3.0-air-m5-anefix+ #1 SMP PREEMPT Mon Nov 23 19:54:47 CET 2026, NixOS25.11.20260324.1073dad, SELinux N/A / disabled, 0 AVC denials, paired with accel/ane: T8142: apply engine bridge setup at power-up #3008):cpu2(DCS 7 / SOC 3,unet-320x 600 runs):report_donedrops from660.5 us(no floor) to350.7 usat4176 MHz(host p50954.4 us->616.5 us,4.49 W), with no further gain at4464 MHz(363.0 us,5.31 W).4176 MHzconfirmed DCS 7 / SOC 3 remains optimal over 7 / 4.0x00000000,dcs 0,soc 0,policy0/1 min=300000,update errors: 0) within 1.5 s after ANE work completes; survives 30 s deep sleep/resume; 0 failed systemd units and 0 new CLPC/kernel errors.P-cluster frequency/power sweep and fabric A/B on J813 (T8142)
Pinned to E-core
cpu2, DCS 7 / SOC 3 floor active,unet-320x 600 runs with #3008:delta_fwreport_done0 kHz(off)760.4 us660.5 us954.4 us2.44 W3072 MHz483.1 us384.7 us626.7 us4.64 W3516 MHz477.8 us378.7 us664.9 us4.55 W3720 MHz466.7 us368.1 us617.9 us4.19 W3876 MHz462.1 us362.4 us615.8 us4.14 W4020 MHz459.3 us359.8 us620.5 us4.81 W4176 MHz450.0 us350.7 us616.5 us4.49 W4464 MHz460.4 us363.0 us601.3 us5.31 WFabric A/B at
4176 MHz(pinnedcpu2):unet-320:7 3622.4 us(mean613.1 us) vs7 4613.2 us(mean609.7 us)mm-512x2048:7 3357.2 usvs7 4365.2 usdenoise-640:7 34210.7 usvs7 44257.0 usStill to run
Pre-PR checklist
"apple,t8142".checkpatch.pl --strict --no-signoffclean.Signed-off-by:applied and ready for review.Assisted-by: LLM (Gemini 4 Neon)