Repository navigation
Conversation
26c731a to
d75f082
Compare
Let a board give the DCS and fabric state pair a CPU cluster busy in the top quarter of its frequency range requests, taken from the CLPC floor residency macOS shows on that board. Without it the SoC's table applies. Signed-off-by: Satya Benson <satya@benson.earth>
A CPU cluster busy in the top quarter of its frequency range requests the top entry of the SoC's map. Where the board's DT gives apple,cpu-busy-floor, request that DCS and fabric pair instead. GPU and ANE demand keep the SoC's states, and a malformed value keeps the SoC's table. T6050's table is shared by the M5 Pro and the M5 Max, and their macOS behaviour differs: J714sAP (26A428) shows no vote for one CPU-bound thread and DCS 5 / fabric 2 for 18 threads, while J775c (26B123) holds its top two DCS/fabric floor pairs for one thread. Whether the macOS version or the SoC variant causes this is not known, so the shared table stays as it is and the board property carries J775c's value. Signed-off-by: Satya Benson <satya@benson.earth>
… CPU Under one CPU-bound thread (7-Zip, 3 runs), macOS 27.2 (26B123) on J775c holds the CLPC's DCS floor at F7 for about 52% of the run and F8 for about 41%, and its SOC floor at VMAX for about 43% and VOVD for about 50%. The two move together, as the pairs F7/VMAX and F8/VOVD. Read in state order, those pairs are DCS 5 / fabric 2, the SoC table's top entry, and DCS 6 / fabric 3. That reading is not verified: it rests on the order of the states, 7 DCS floor states as Linux has 7 DCS states, and 5 SOC states (one never used) where Linux has 4 fabric states. A static floor can hold only one of the pairs; this board asks for the top one. Same-boot A/B, interleaved over 3 rounds; median (range): arm (PMC floor read back) 5/2 (0x25) 6/3 (0x36) 7-Zip 1T on cpu0 9635 (9584-9648) 9884 (9883-9894) 7-Zip 18T 183857 (183753-185843) 189748 (187715-192740) STREAM triad 18T (MB/s) 328493 (321023-333930) 361656 (360632-365305) STREAM triad 1T (MB/s) 132306 (131183-132523) 131313 (130854-132691) 64 MiB latency, cpu0 (ns) 21.3 (21.1-21.4) 18.6 (18.1-18.8) Signed-off-by: Satya Benson <satya@benson.earth>
d75f082 to
6047201
Compare
|
Thanks for the careful A/B and the energy numbers; they make the trade-off clear. One question on where the choice lives. We select behaviour by a hardware property rather than by the machine it was measured on, and a board property is fine when it describes something about the board. Here Could the binding and the J775c comment name the board difference that makes the higher floor right here, for example mains power and the Studio's cooling? Then the other desktops with that difference (J775d) would carry it too, and the laptops would not. If the 26B123 Pro capture shows it is the Max die instead, the value belongs at that level; if it is a preference, the "performance" platform profile is the natural selector. The mechanism itself looks good to us. |
|
Claude Opus 5.5 on @satchlj's behalf: thanks. The short answer is that the evidence doesn't yet name the board difference, so I'd rather not write one into the binding. What we have:
Four things differ between the two captures:
Any of them could be why the Pro never reaches VOVD, the fabric state of the 6/3 pair. Mains power and the Studio's cooling are a plausible reason, since VOVD reads as an overdrive state. But that's a hypothesis, and it is unproven that macOS keys the pair on the board's power or cooling. On "a preference": macOS ran its default energy mode for that capture; nothing was set by hand. So 6/3 is what macOS does by default on this board, not a user preference in macOS's own terms. Matching macOS's default is why it sits in the balanced (default) path here, and not behind What would separate the candidates:
Until then:
If a capture shows it's mains and cooling, I'll restate the property in those terms and add J775d. If it's the Max die, the value moves to the Max level. If it's the energy mode, it moves to the platform profile. 🤖 Generated with Claude Code |
|
Thanks, that is a fair answer, and the table makes the four confounders clear. Keeping the binding and the J775c comment worded as this board's measured macOS residency, with the cause stated as open, is fine for now. So is leaving J775d out until it has its own capture. Your option 1 looks like the cheapest way to separate the candidates, since it needs only lobata. If the pair moves with macOS's energy mode, the selector is the platform profile and nothing per-board is needed. Could you run that capture before this lands? If the pair turns out to be fixed for the board, a short note on it in the description would settle it. |
6047201 to
a8a2da0
Compare
a8a2da0 to
3323176
Compare
DjDeveloperr
left a comment
There was a problem hiding this comment.
Pre-PR checklist review at 3323176bfe58 (§1–§6). The DT property parsing (of_property_read_u32_array + > 0xf + of_property_count_u32_elems != APPLE_CLPC_RAILS), apple_clpc_status_show() update, commit attribution, and CI (8/8 green) are clean. Requesting changes on §1 design gating, a low-power profile interaction, and §5 evidence:
Blockers
-
§1 No model gating — new per-board DT ABI before establishing the selector (
Documentation/devicetree/bindings/power/apple,pmc.yaml,arch/arm64/boot/dts/apple/t6050-j775c.dts:30-37):
Addingapple,cpu-busy-floorto the DT binding and setting<6 3>only ont6050-j775c.dtsbakes a single-board override into the DT ABI while four confounders (macOS 26B123 vs 26A428, Max vs Pro, desktop/mains vs laptop, native vs hypervisor) remain unresolved and the state-order mapping is explicitly marked(state order, not verified).@RyanTheTide's open request from 2026-11-20 is still unanswered: please run the read-only macOS energy-mode capture (Low Power / Automatic / High Power) on lobata before landing. If the pair moves with macOS's energy mode, the selector belongs inplatform_profilerather than a per-board DT property; if it is fixed for the board/die, documenting that result settles the hardware reason §1 requires. -
low-powerplatform profile interaction (drivers/soc/apple/clpc.c:525-531,887-895):
apple_clpc_cpu_state()unconditionally substitutesclpc->cpu_top(<6 3>, which your own energy A/B shows costs +12% energy at 1T and +4.5% at 18T) wheneverq == APPLE_CLPC_LEVELS - 1, without checkingREAD_ONCE(clpc->low_power). UnderPLATFORM_PROFILE_LOW_POWER, any cluster whoselow_power_khzceiling (2808 MHzon T6050) sits in the top quarter (>= 75%) of itscpuinfo.max_freqwill still request the +12%-energy overdrive floor. Either gatecpu_topoff whenlow_poweris active (or confirm from the lobata Low Power capture that macOS still requestsF8/VOVDin Low Power mode). -
Minor code cleanliness (
drivers/soc/apple/clpc.c:1040,1424-1426):
apple_clpc_cpu_top_init()can never return non-zero, leaving a deadif (ret) return ret;inapple_clpc_probe(); it can bevoid.
Checklist summary (§1–§6)
- §1 No model gating: Blocked by item 1 (unsettled board vs die vs platform-profile selector).
- §2 Production-ready: Blocked by item 2 (
low_powerprofile interaction). - §3 Safety: Pass (
0..15bounds check keeps 4-bit PMC rail fields intact; invalid DT falls back to SoC map). - §4 Clean-room & attribution: Pass — human commits and
Signed-off-byonly (cleaned up in3323176bfe58), read-only IOReport measurements,Assisted-by:at end of PR body. - §5 Evidence: Incomplete — the PR body explicitly notes the exact branch head has not been booted on hardware (
cand-9ran against#2102's J775c DT composition), and no §5 regression run (0 SELinux denials, 0 failed units, 0 new kernel errors) is reported. - §6 Naming: Pass.
Assisted-by: LLM (Gemini 4 Neon)
Claude Opus 5.5 on @satchlj's behalf.
What this does: gives J775c (Mac Studio, M5 Max) the DCS/fabric pair a busy CPU cluster requests on this board, through a new CLPC property,
apple,cpu-busy-floor. The pair is taken from the board's own macOS behaviour: its IOReport floor residency, recorded read-only. It is not taken from a list of tested boards, and T6050's shared table stays at DCS 5 / fabric 2.apple,cpu-busy-floor = <DCS fabric>, two state indices, 0 for the lowest state, each 0–15 (a 4-bit PMC rail field).apple,cpu-busy-floor = <6 3>.Base:
integration/auroraf0c51766e9c5(rebased 2026-11-20 14:4xZ; #2088, #2101 and #2447 sincec92ed8517b79touch none of this PR's files).Where 6/3 comes from
macOS 27.2 (26B123) on lobata (J775c), recorded read-only with IOReport during
7zz b 1 -mmt1, 3 runs (behaviour only):PMC DCS Floor/CLPC(7 states)PMC SOC Floor/CLPC(5 states)DCS/SOC Floor/PACC,MACC0,MACC1) read 0 throughout. macOS doesn't raise this floor through that path for a CPU-bound thread, which is why pmdomain: apple: pmp-report: DT-selected CPU memory floor, on by default for T6000 #2529's mechanism wasn't used here.Mapping, not verified. Read in state order, F7+VMAX is DCS 5 / fabric 2 (the SoC table's top entry) and F8+VOVD is DCS 6 / fabric 3. That reading rests only on the order of the states:
Static vs dynamic. macOS alternates between the two pairs within one run. A static floor can hold only one of them. This board asks for the top one, so it spends more time at 6/3 than macOS does.
Why a board property. J714sAP (M5 Pro) under macOS 26A428 differs: no vote for one CPU-bound thread, and DCS 5 / fabric 2 for 18 threads (
b84f5655f2ee). Whether the macOS version or Pro vs Max causes the difference is open.J714s capture (Dj's M5 Pro lane, 2026-11-20). It ran under macOS 26A428 in aura's hypervisor, not under 26B123 natively, so it is not conclusive between the OS version and Pro vs Max:
The CPU-client floors total 0 there too, as on J775c.
So the Pro reaches DCS F8 with SOC held at VMAX, and never reaches VOVD, the fabric state of the 6/3 pair. On J775c under 26B123 the two floors move together: F8 comes with VOVD, F7 with VMAX.
This is one more reason the shared T6050 default stays at 5/2. A 26B123 native capture on a Pro would separate the two causes. If it showed the 6/3 pair, the follow-up would change the shared default and this property would go away.
Testing (J775c, lobata)
A/B kernel: cand-6,
1487b5742831=integration/aurorad91db387c720+ 81 composed commits + 2 local diagnostic commits (one makes the top map entry writable at run time). That is not this PR's head. Same boot, arms interleaved; median (range) over 3 rounds:6-thread STREAM is left out: its two ranges overlap widely between runs (166–265 vs 215–289 GB/s).
Energy to completion (cand-6 again, a second boot; Shelly wall energy, 2 interleaved rounds, no meter freeze; each run ±0.119 Wh of quantisation):
So the higher floor costs energy under load, more than it saves in time: about 12% for one thread and 4.5% for 18. Idle doesn't change, because the floor drops at idle. Both differences are well outside the quantisation, and they repeat across rounds. That trade-off is why this is a board choice made from macOS's behaviour, not a default.
This PR's own code: cand-7,
324280cadc47=d91db387c720+ 85, with these three commits (the DT hunk applied to #2102's J775c board file):busy CPU floor: DCS 6, fabric 3.On this PR's base: cand-9,
df1005dceaa0=integration/auroraf0c51766e9c5+ 84, carrying these three commits. The kernel logsbusy CPU floor: DCS 6, fabric 3. Under 7-Zip 1T on cpu0 the floor reads 0x36 (9864). Under GPU work it reads 0x26 (reason host_gpu), as on the tip. cand-8 (7b5df9391f5fonc92ed8517b79) read the same.Static checks on this branch:
dt_binding_checkforapple,pmc.yamlandCHECK_DTBSfort6050-j775c.dtb: no warnings.clpc.obuilds with W=1. Its one kernel-doc warning, aboutpmp_agent, comes from the tip's existing code.f44bf7af65ea. The rebases onto391fac6343f5and thenc92ed8517b79touched none of these files.Untested:
Assisted-by: LLM (Anthropic:Claude Opus 5.5)