Repository navigation
Conversation
The T14's MSR_TURBO_RATIO_LIMIT gives ratio 42 to one or two active cores and 38 to three or more. ToyOS's cpu.clock reads at most 3789 MHz in every osbench group and Linux's up to 4192, 1.105 apart as 42 and 38 are, and the one-thread crunch rows run 1.09 to 1.10 times slower. The HWP request (maximum 42 under both systems), turbo, the power limits and C1E promotion are each the same or not binding under both; the difference left is idle, hlt's C1/C1E against Linux's C7. That a core in C1 counts as active is inference until a Linux run limited to C1 and the deep-idle scout read it, so the speed track keeps the bullet under what is unexplained and the C-state track, which owns the fix, carries the clock in its exit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…f 42 PR #1066's scout, where every idle CPU waits in MWAIT 0x31 instead of hlt, read cpu.clock at 4189 MHz in 13 of 17 osbench groups. The hlt control read at most 3789 MHz in every group, and crunch.single ran 1.10 to 1.11 times faster under the scout. So the bullet moves from the speed track's unexplained list to its measured one. The C-state track records the gain beside the scout's slower work.build_shaped.j1. That reading is unattributed: the control ran on a later main whose memory charging differs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review r1: #1066 at
|
The C-state track is assigned: it is being built on branch deep-idle, and that branch's PR carries its design. The AML track's 2026-10-12 ordering ruling is marked superseded, because the owner's direction of 2026-10-27 releases the plan's order. The track's exit gains a cpu.clock reading, which the orchestrator accepted under that direction. The exit names its statistic and scope: the maximum at ratio 42 in every group where Linux's, on the same T14, reaches 42. Where each reading of the old T14 clock bullet lives now: - The cause, MSR_TURBO_RATIO_LIMIT 38 against 42 with what was ruled out and "at most 3789 under hlt", stays in the speed track's measured list. - The scout's figures, and its work.build_shaped.j1 p50 stated as an unresolved reading with its spread, live in the C-state track only. - Cores never below C1/C1E, package never leaving PC0 and the 3.16 W idle package move to the C-state track, whose exit measures idle energy. - The internet_download windows' 2.67 (and 2.53) GHz median stays in the speed track as unexplained: the bin bounds it, it does not explain it. - Intel's part specification gives way to the MSR it summarises. The 5.65 W against PL1 and #1065's network-session maxima are subsumed by "no power limit bit logged" and the full session's at most 3789. Both remain in #866 and on evidence branch pr-1065. The AMD sentence states the one-thread crunch.single ratios, parse excepted, rather than a cpu.clock p50. The scheduler-clocks track no longer says idle-state awareness waits for an AML interpreter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
r1 response. Head
Suggestions:
|
Review r2: #1066 at
|
…t 0 again The group-start roster instrument (6a0fa3f) opened the counters' Diag before each group's first row, and Diag took the process's one SysCap endowment. `osbench identity` and `osbench fair` each take it again for a row of their own, found nothing and refused, so both groups exited 1 on every bench in every boot since. The metal judge says so when it is run over the readbacks; it was not run. The endowment is now taken once, by `sys::syscap()`, and every user borrows it: the counters' Diag, identity's inventory read and fair's job builder. `osbench_capability_groups_exit_0` boots benchcase.toml under QEMU with those two groups alone and holds each to exit 0, so a capability taken twice fails a PR's own QEMU run rather than a nightly bench. Review r3's suggestions: - A wait the bound or a new declaration sends to C1 publishes exit 0, so `idle_exit` is what the CPU waits in. - `Plan::learn`'s Unforeseen and Deadline arms have a test. - The AMD deflate finding records only what was measured. B4 ran the slow mode on CPU 10, which earlier read fast, so the record is renamed: the mode varies per boot at the same clock and with no running neighbour. - The track names #1066's exit as unmet, 8 to 10 of 17 group starts against Linux's 13, with acpiserver's start-up a measured busy core at four. - A stray blank line goes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A diagnosis, measured on the T14. This PR updates the records only and changes no code. The fix, deep idle, is being built separately on branch
deep-idle.Problem and cause
On the T14 (i5-1135G7), osbench's
cpu.clocknever reads above 3789 MHz under ToyOS. Under Linux it reaches 4190 MHz, and ToyOS's one-thread compute rows run about 1.10 times slower.The cause is idle. Every idle ToyOS core waits in
hlt, which is C1 or C1E. With those cores idling there, a one-thread load getsMSR_TURBO_RATIO_LIMIT's ratio for three or more active cores, 38. Linux's idle cores sit in C7, so a one-thread load there gets the ratio for one or two cores, 42. The register reads0x2626262626262a2a(#866's dump). Nothing else limits the clock:0x80002a01on ToyOS,0x80002a04on Linux)IA32_MISC_ENABLE[38]is clear, CPUID.06H:EAX[1] is set, and the clock runs above the 2.4 GHz baseThe ratios agree: 4190 / 3789 = 1.106 and 42 / 38 = 1.105.
Measured on the T14 (r2)
hltcpu.clockmaxcrunchandworkamong them; 3789 in fair, net, procs and memcrunch.singledeflate, sha256, matmul, parsework.compress_inprocwork.build_shaped.j1(n=5; B spread 817 to 1594 ms)cpu-freq-scout3cdfa1a97, measurement only, never lands. Every idle wait ismwait 0x31, the T14's_CSTC2. It is taken only where CPUID enumerates MONITOR/MWAIT, the break-on-masked-interrupt extension, the sub-state and ARAT. Wakes are unchanged. All 8 CPUs loggedtaken=true.211829921:main8348c2a2cplus a change to fileserver only, with the samehltidle and the same row.crunch.single, that control is sound. Betweenaeba59fb0and8348c2a2cthe only kernel change is mm: every charge is its job's, the controls keep a floor, and a restart refused for memory waits for it #1057's memory charging. It touches no part of the idle path, the HWP declaration or CPU setup. A's clock also matches the 2026-10-24 session ataeba59fb0.work.build_shaped, which spawns processes, mm: every charge is its job's, the controls keep a floor, and a restart refused for memory waits for it #1057 is a confound. B's j1 p50 read 1176 ms against A's 967 ms. B's own 5 runs spread from 817 to 1594 ms, so its fastest run beats A's fastest (905 ms), and B'smhz_settledwas 4189 against A's 2492. That reading is unresolved, not a measured slowdown.</dev/null, so it also consumed the rest of the ssh heredoc: the states were never disabled and the second spin never ran. The orchestrator confirmed that every state still reads enabled. L is recorded as no evidence and was not rerun, because B shows the cause on ToyOS itself.The fix
The fix is deep idle:
issues/idle-cpus-enter-the-c-states-cst-names.md, now assigned and being built on branchdeep-idle, whose PR carries the design. No MSR that ToyOS declares holds the clock. Writing ratio 42 into the turbo table would set the frequency limits rather than support the hardware.The owner's direction of 2026-10-27 was general: do it properly, with no workarounds, whatever the plan order. That direction releases his 2026-10-12 ordering ruling, which the AML track now marks superseded. Building deep idle now, and adding
cpu.clockto the track's exit, are the orchestrator's decisions under that direction. The scout is not the design: it has no state choice and no latency bound.cpu-freq-scoutstays pushed until the deep-idle PR lands, because it is the measured revision.AMD (Zen 2, Ryzen 7 4800U), today
_CPCis unread, and no PPR excerpt is in the evidence. The documented mechanism isPStateCtl(MSRC001_0062) with Core Performance Boost (HWCR[25], reset 0). ToyOS writes neither, so firmware's state stands.crunch.singledeflate, matmul and sha256 run at 0.98 to 1.02 of Linux's (session-amd). Parse runs faster under ToyOS on both benches (0.53 here, 0.62 on the T14) and is no clock reading.PstateCmdsurvives a warm reset, and nothing measured shows ToyOS inheriting a slower P-state.The change
issues/toyos-uses-what-modern-hardware-offers-for-speed.md:hlt, with a pointer to the C-state track.internet_downloadwindows' median (2.67 GHz) stays in the unexplained list: the bin bounds it but does not explain it.crunch.singleratios, parse excepted.issues/idle-cpus-enter-the-c-states-cst-names.md:assigned: being built ondeep-idle.hltidle baseline moves here: never below C1/C1E, package never leaving PC0, 3.16 W idle.cpu.clock's maximum at ratio 42 (4185 to 4190 MHz, Linux's on the same T14) in every group where Linux's reaches 42.issues/toyos-runs-the-machine-in-acpi-mode-and-interprets-its-aml.md: the 2026-10-12 ordering ruling is marked superseded.issues/the-scheduler-and-the-clocks-never-talk.md: no longer says idle-state awareness waits for an AML interpreter.83fc57c6e's message accounts for each reading the old bullet carried.Checks
cargo run -- --ci hostat83fc57c6e: exit 0, 103 steps, docs scope (log). An earlier head,12396aa9f, also passed in full scope (log).--build-only(exit 0), and its disassembly showsmonitor; mwaitwith ecx = 1, thensti; nop.--metal-readback. B's booted image matches the staged hash,c321adf6…f8c9.Risks
🤖 Generated with Claude Code