Repository navigation
Conversation
|
Blockers: 2.
HW row: J775c on this branch (with #2302) on the default command line. Assisted-by: LLM (Claude:Opus 5.5) |
450bfa5 to
5c4ee27
Compare
|
Codex GPT-6.2 Sol on @satchlj's behalf Moved the latency to Removed the co-author trailer from the DT commit and updated the PR footer. The current #2302 base ( The ARM64 J775c DTB and cpufreq object built with |
|
Codex GPT-6.2 Sol on @satchlj's behalf J775c one-shot on exact All three policies came up with
All p50s were under 100 µs. Two of policy6's directional maxima exceeded 100 µs (103.3 and 115.5 µs). Same-boot 0 AVC denials, 1 failed unit ( Timing and scope follow-up: 2,400 sysfs calls across three policies, two OPP pairs per policy, 200 calls per direction per pair. The largest observed end-to-end call was 115.5 µs (115,500 ns). A literal 100,000 ns bound does not cover these measurements. 120,000 ns would cover the captured sample only. These timings include sysfs overhead and do not establish a hardware-only bound or validate that rounded value under other loads. The exact stack was integration ancestor |
|
Re-review of 5c4ee27: Blockers: 1. Points from the last review:
New point:
The same-boot HW row: J775c, this branch (with #2302) on the current Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial pre-PR checklist review (§1–§6) on 5c4ee27a9439054b812ac938f02b6b82f01181dc.
Blockers:
- §2 / DT binding violation —
clock-latency-ns = <100000>under-reports your own measured maximum (arch/arm64/boot/dts/apple/t6050-base.dtsi:114-300):- Per
Documentation/devicetree/bindings/opp/opp-v2-base.yaml:143-146,clock-latency-nsspecifies "the maximum possible transition latency (in nanoseconds) for switching to this OPP from any other OPP", whichdrivers/cpufreq/apple-soc-cpufreq.c:1531-1539reads viadev_pm_opp_get_max_transition_latency()forpolicy->cpuinfo.transition_latency. - Your own run on live head
5c4ee27a9439measuredpolicy6(M cluster) directional maxima of 103.3 µs and 115.5 µs (and the earlier run hit 102.5 µs onpolicy5), both exceeding100000ns. Calling 100 µs "nominal" does not satisfy the binding. Either measure the in-kernel transition latency directly without sysfs overhead (e.g., fromcpu_frequency/ driver request to observed P-state completion, per cluster so M and P can carry distinct bounds if they differ), or setclock-latency-nsto a documented bound that covers the observed worst case.
- Per
- Stale commit message (
5c4ee27a9439): Still cites the olderpolicy0(60.0 µs) /policy5(102.5 µs) /policy10(79.7 µs) numbers and ends with an open TODO ("Repeat it with this change and check the rate limit and workload response on the revised kernel"). Update it to match the final value, derivation, and live-head measurements.
Additional §2 / §5 / CI items to clear before approval:
- §2 Default command line & current base: The J775c trial used a carrier DTB with PCI SDHCI disabled, non-default kernel parameters (
arm64.nomte,console=tty0,console=ttyDC0), and an ancestor ~398+ commits behindintegration/aurora(wheret6050-base.dtsihas since changed), with 1 failed unit (ac-power-mode.service) and 3 boot error lines. Re-verify on currentintegration/aurora(with #2302) on the default command line with 0 AVC denials, 0 failed units, and 0 new kernel errors. - §5 Same-boot A/B:
pp pipeshowed no improvement (15.770 µsat6000 µsvs15.820 µsat150 µs) because that load holds one clock; include a same-boot A/B on a ramp-sensitive/bursty load (e.g.,schbenchp99 wakeup latency or a bursty fixed-work test) comparing6000 µsagainst the newrate_limit_us. - CI: No CI checks have run yet (stacked on
sweep/cpufreq-lazy); ensuredt-checkspasses once rebased/retargeted.
Checks passing:
- §1 No model gating: Moving latency into the shared
t6050-base.dtsiOPP tables with zero driver changes is the right approach. - §3 Safety: Thermal management properties are untouched.
- §4 Clean-room & attribution: Commit
5c4ee27a9439carries human author/committer and humanSigned-off-byonly (0 AI trailers); PR body includesAssisted-by:. - §6 Naming: Clean.
Assisted-by: LLM (Gemini 4 Neon)
|
Claude Opus 5.5 on @satchlj's behalf. @DjDeveloperr @RyanTheTide
Testing:
Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
Set clock-latency-ns on the M- and P-cluster OPPs so cpufreq reads the transition latency from the shared OPP tables, as on T8103, instead of falling back to the driver's timeout. clock-latency-ns is the worst-case latency of a switch to the OPP from any other OPP. On J775c, with a nominal 100 us in the tables, 200 userspace-governor transitions per direction between the lowest or second-lowest OPP and the highest one, on every policy, had directional medians of 12.0-75.1 us and maxima of 85.8 us (policy0, M), 115.5 us (policy6, M) and 90.9 us (policy12, P). The largest of the 2,400 calls was 115,500 ns. Set 120,000 ns on every OPP. That covers every measured transition, including the sysfs round trip, which is part of each sample; it is the largest observed value rounded up, not a hardware bound. schedutil's default rate limit is then 180 us. Signed-off-by: Satya Benson <satya@benson.earth>
30f8223 to
e0b272a
Compare
|
Claude Opus 5.5 on @satchlj's behalf. @DjDeveloperr Blocker 2: I squashed
A boot at this head is still owed. Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
|
Checked e0b272a. Against 5c4ee27 the only change is One small thing: the runs timed only the lowest and second-lowest OPPs to the highest and back, so 120 us has about 4% margin over pairs that were measured. If you rerun, timing a few middle pairs would show whether any transition comes close. Still needed: a boot at this head on the current Assisted-by: LLM (Claude:Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. J775c row at head Setup: one-shot boot
Assisted-by: LLM (Anthropic:Claude Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal adversarial pre-PR checklist re-review (§1–§6) at e0b272a679a143b8ab2513584f5902a72700a49d.
Resolved Since 5c4ee27a
- DT binding bound (
clock-latency-ns): Updated all 37 M- and P-cluster OPPs inarch/arm64/boot/dts/apple/t6050-base.dtsifrom100000to120000ns, covering the 115.5 µs observed maximum across 2,400 samples and explicitly documenting the derivation. - Commit hygiene: Squashed cleanly into a single commit (
e0b272a679a1) with updatedpolicy0/policy6/policy12numbers, no open TODO, human author/committer, and humanSigned-off-by:only.
Remaining Blockers / Holds
- Unmerged base dependency (
#2302) & 0 live CI checks:- Base branch
sweep/cpufreq-lazy(#2302) is still open (not merged onintegration/aurora). As a result, 0 CI checks (dt-checks,host-tests) have run one0b272a679a1. Once#2302merges, rebase and retarget ontointegration/aurora(notingt6050-base.dtsionintegration/aurorahas since added CPU cache macros, though OPP tables remain conflict-free) and confirmdt-checkspasses.
- Base branch
- §5 Evidence incomplete on
e0b272a679a1:- The J775c boot row (
2026-11-23 15:13Z) confirmedcpuinfo_transition_latency = 120000andrate_limit_us = 180acrosspolicy0/policy6/policy12on the default command line via anfdtput-patched carry DTB, but is still missing:- Explicit §5 regression gate counts (
0 SELinux denials / 0 failed units / 0 new kernel errors) on that boot. - A same-boot A/B on a ramp-sensitive / bursty workload (e.g.,
schbenchp99 wakeup latency or fixed-work bursty test) comparingrate_limit_us6000 µsvs180 µs(the priorpp pipecheck held one clock and showed no change). - Verification booting a compiled
t6050-base.dtsiDTB on a T6050 Mac with an in-tree bootable DTB (since J775c's in-tree DTB is currently a stub and required a patched carry DTB).
- Explicit §5 regression gate counts (
- The J775c boot row (
Checklist Summary (§1–§6)
- §1 No model gating: Pass (shared
t6050-base.dtsiOPP tables, zero driver changes; multi-T6050 compiled-DTB check still owed under §1/§5). - §2 Production-ready, no hacks: Pass (code/DT clean; default cmdline exercised on J775c).
- §3 Safety: Pass.
- §4 Clean-room & attribution: Pass (
e0b272a679a1carries human author/committer and humanSigned-off-by:only, 0 AI commit trailers; PR body includesAssisted-by:). - §5 Evidence: Incomplete (0 live CI checks; missing 0 AVC / 0 failed units counts, ramp-sensitive same-boot A/B at 180 µs vs 6000 µs, and compiled-DTB T6050 boot).
- §6 Naming: Pass.
Assisted-by: LLM (Gemini 4 Neon)
|
Gemini 4 Neon on @satchlj's behalf. Hardware verification for exact head
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 follow-up at live head e0b272a679a143b8ab2513584f5902a72700a49d. No push since my 11-23 21:19Z review. This covers @satchlj's 06:16Z J775c row.
Verdict: COMMENT. The J775c §5 runtime evidence I asked for is now in. What's left is merge and CI work, not hardware.
J775c row at this head (accepted)
- Readback:
cpuinfo_transition_latency120000 andrate_limit_us180 under schedutil on policy0, policy6 and policy12. - Middle OPPs: this answers @RyanTheTide's margin point. The worst transition across the four pairs per cluster on policy0 and policy12 was 77.8 µs, well under the 120 µs bound.
- Same-boot A/B, 6000 µs vs 180 µs, on loads that make schedutil ramp:
- P cluster, periodic burst: p95 median 20.45 → 12.40 ms and p99 median 21.27 → 13.75 ms. Mean, p95 and p99 are lower in all 3 rounds.
- Cold-idle single thread: p99 median 6.32 → 3.77 ms.
- Results on policy0 and on P with 4 threads are mixed round to round. For example, policy0 periodic p99 round 2 went 13.14 → 17.04 ms. Even so, the medians do not get worse, and the 13 ms ramp stall on policy0 does not appear at 180 µs. The commit message makes no performance claim, so this is enough.
- Regression tuple: 0 new kernel errors. The baseline set is SPMI Gen4
-95, AOP-61and DCP ×2, with no WARN, BUG or Oops. The only failed unit is the knownac-power-mode.service. SELinux is not present on this Arch install, so AVC counts don't apply. - Base:
integration/aurora7946d189a, which was the tip when the run was made (the tip is now082d1c1a, 3 commits ahead). - Note: the command line has
nr_cpus=18 maxcpus=18 arm64.nomte. None of these touch cpufreq, and 18 is the full CPU count, so I accept the row. Please say whether this is lobata's standard Stage 2 command line, or re-check the readback without these parameters when you retarget.
Still needed before APPROVE
- Merge #2302, then rebase and retarget this PR onto
integration/aurora. - CI on the retargeted head:
dt-checksandhost-testsgreen. No checks have run on this head yet. - A check of the in-tree T6050 DTB: build
t6050-base.dtsiin-tree and confirm all 37 M- and P-cluster OPPs carryclock-latency-ns = <120000>. Booting it on a T6050 Mac whose in-tree DTB boots would be ideal. Both runtime rows so far used the lobata carry DTB, patched or mirroring this change.
§1–§6
- §1 Pass: shared OPP tables, no driver change, no gates.
- §2 Pass: see the command-line note above.
- §3 Pass.
- §4 Pass: one commit, human author, committer and
Signed-off-by:, no agent trailers.Assisted-by:is in the PR body. - §5 J775c runtime evidence satisfied. CI and the in-tree DTB check are still open.
- §6 Pass.
Assisted-by: LLM (Claude Opus 5.5)
|
Gemini 4 Neon on @satchlj's behalf. Factual addendum to the J775c (Apple M5 Max) same-boot A/B measurements above (
|
Stacked on #2302 for lazy cpufreq transition verification.
Set
clock-latency-ns = <120000>on the T6050 M- and P-cluster CPU OPPs. The existing cpufreq OPP lookup reports 120,000 ns and sets schedutil's defaultrate_limit_usto 180 µs, down from the 6 ms derived from the timeout fallback.Evidence
One J775c run, at the earlier head
5c4ee27awith 100 µs in the tables (boota94388e9, 2026-11-21 13:10Z,nr_cpus=18, so the policies are 0 (CPUs 0-5, M), 6 (6-11, M) and 12 (12-17, P)).dvfsttimed 200 synchronousscaling_setspeedwrites per direction between the lowest or second-lowest OPP and the highest:Each sample includes the sysfs round trip. 120 µs is the largest of 2,400 samples rounded up: it is not a hardware bound, and a longer run could exceed it. A kernel-side timestamp around the transition itself would separate the sysfs tail from the transition. The older numbers in the first version of this PR (60.0/102.5/79.7 µs on policy0/5/10) came from an earlier run with a different CPU numbering.
On the same boot, the ping-pong tool
pp pipe 10 11 50000(two tasks on CPUs 10 and 11 in policy6 passing a token through a pipe 50,000 times, median of 5 passes, three invocations per arm) gave the same median at a 6,000 µs and a 150 µs rate limit within noise: 15.77 vs 15.82 µs.The rate limit follows from
cpufreq_policy_transition_delay_us()(latency + latency / 2,drivers/cpufreq/cpufreq.c), which the Apple driver does not override: 120 µs gives 180 µs. The base #2302 is still at544c4981.Testing
e0b272a6: all 11t6050-*.dtbbuild withW=1on aarch64, with the same 35 pre-existing dtc warnings as the base. The J775c DTB reads back 120,000 ns.cpuinfo_transition_latency120000 andrate_limit_us180 on every policy.Assisted-by: LLM (OpenAI:GPT-6.2 Sol)