Repository navigation
Conversation
26c731a to
d75f082
Compare
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. @RyanTheTide @DjDeveloperr here is the energy-mode capture you asked for. The CLPC busy floor follows macOS's energy mode, so by the rule I wrote before the run, the selector belongs in Setup: lobata (J775c), macOS 27.2 (26B123), 2026-11-23 16:20–16:33Z. This is the same read-only IOReport method as the PR's 2026-11-20 numbers, with one display (HDMI, 2560×1440).
Floor residency (states ≥ 5 %) and 7-Zip MIPS:
What this shows:
So the "busy floor" pair is not a fixed board property. Low Power removes it for a single thread. A DT value can hold only one answer, and on this board that answer depends on the energy mode. Decision rule, as written beforehand: "if the 1-thread pair changes between modes by at least one DCS or fabric state, the selector is the energy mode and #2565 should become a Proposal for the next revision:
I'd like your view before reworking it, in particular whether the values themselves should stay in the DT at all, or move to the driver's per-SoC table with the profile as the only switch. Raw files: lobata notes Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
Let a board give the DCS and fabric state pair a CPU cluster busy in the top quarter of its frequency range requests outside the low-power platform profile, taken from the CLPC floor residency macOS shows on that board in its default energy mode. Without it, or under low-power, 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 and the low-power platform profile is not active, request that DCS and fabric pair instead. Under low-power (where macOS drops the single-thread busy floor), GPU and ANE demand, or a malformed value, the SoC's table applies. 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 in Automatic mode and drops them in Low Power mode. Keep the shared table at 5/2 while the board property carries J775c's non-low-power 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 in Automatic energy mode 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. Under Low Power mode macOS drops the single-thread floor (F1 85-87%, VMIN 99%), so the driver applies this property only outside low-power. 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>
3323176 to
97f18f0
Compare
|
Gemini 4 Neon on @satchlj's behalf. Rebased onto
Offline verification (
Still open:
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Code re-review at verified live head 97f18f01f792bae50ad83f308b25e10725993eba (rebased cleanly on integration/aurora, MERGEABLE, 7/8 CI green with dt-checks finishing).
- Code, binding, KUnit & attribution — PASS:
apple_clpc_cpu_state()cleanly gates the board override on!READ_ONCE(clpc->low_power),apple_clpc_cpu_top_init()isvoidwith strict 2-element /<= 0xfvalidation,apple_clpc_cpu_busy_floor_testcovers default/override/low-power paths, and all 3 commits carry human author/committer + humanSigned-off-by:only. - 0 remaining code/attribution blockers. Ready to move forward once
dt-checksfinishes green, the exact-head §5 J775c hardware row is posted, and the open DT-property vs SoC-table design choice is settled.
Assisted-by: LLM (Gemini 4 Neon)
|
Gemini 4 Neon on @satchlj's behalf. Hardware-verified exact head
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR re-review at verified live head 97f18f01f792bae50ad83f308b25e10725993eba (MERGEABLE/CLEAN on integration/aurora, non-draft, 8/8 CI checks green): APPROVE.
Checklist Summary (§1–§6)
- §1 (No Model Gating — DT Property vs Per-SoC Table Design Call Settled) — PASS: Keeping
apple,cpu-busy-floor = <6 3>as an opt-in board DT property gated by!READ_ONCE(clpc->low_power)is the right call under §1 and matches the existingapple,pmc.yamlCLPC board-policy bindings (apple,high-power-mode,apple,low-power-frequency-max-mhz,apple,gpu-busy-memory-states):- Zero SoC/board/model gates in
drivers/soc/apple/clpc.c. - Respects the 2026-11-23 J775c macOS energy-mode capture (Automatic uses
6/3; Low Power drops the 1T busy floor back to the SoC map). - Avoids silently imposing the +12% 1T / +4.5% 18T energy cost on M5 Pro laptops (
J714sstayed atVMAX/ fabric 2 in prior capture, never reachingVOVD). If a future native 26B123 M5 Pro capture confirms all T6050 boards use6/3outside low-power, the shared default can be updated later cleanly.
- Zero SoC/board/model gates in
- §2 & §3 (Code / Safety) — PASS: 0 blockers.
apple_clpc_cpu_state()cleanly gatescpu_topon!READ_ONCE(clpc->low_power),apple_clpc_cpu_top_init()isvoidwith strict 2-element /<= 0xf(4-bit rail field) validation and safe fallback to the SoC map,apple_clpc_status_show()reflects effective states, and KUnitapple_clpc_cpu_busy_floor_testexercises unset, active override, lower-quarter unchanged, andlow-powerfallback paths. - §4 (Clean-room & Attribution) — PASS: All 3 commits (
a04672137e3a,150faf6b98ca,97f18f01f792) carry human author/committer (Satya Benson <satya@benson.earth>) and humanSigned-off-by:only (zero AI commit trailers); read-only IOReport measurements only; PR body carriesAssisted-by:. - §5 (Exact-Head Hardware Evidence) — PASS: Batch 3 exact-head J775c (
lobata,7.3.0-posth4-b3+,boot_id68438809-98be-49bf-a4ab-0cf593721eda, default cmdline) verified live DT readback (0000 0006 0000 0003),dmesg(busy CPU floor: DCS 6, fabric 3), CLPC debugfs transition from idle (0x24, map2,4,5,6/1,2,2,3,update errors: 0) to 1T busy oncpu0(floor: 0x36,dcs: state 6,soc: state 3,reason_bits 0x1,update errors: 0), KUnit coverage for the!low_powersuppression gate (J775c haslow_power_khz == 0), prior 3-round interleaved A/B perf + Shelly energy numbers, and clean §5 health tuple (SELinux N/A on Arch-SELINUX,0new failed units,0new kernel errors). - §6 (Naming) & CI — PASS: 8/8 CI checks green (
dt-checks,host-tests,source,rust-build,kunit, and all 3DWC3/ATCbuild configs).
Approved for MERGETRAIN6.
Assisted-by: LLM (Gemini 4 Neon)
|
GitHub now reports |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
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)