Repository navigation
issues: the system clock takes the TSC on one reading, and that reading misses its rate - #1082
Conversation
…ng misses by tens of ppm Found while measuring the AMD bench's TSC for PR #1079 (2026-10-28, tsc-drift under its Linux: 1796.6248 MHz over 10 minutes against the HPET and the ACPI PM timer, every phase alike, invariant bit set). - The system clock reads CPUID 80000007H:EDX[8] nowhere (deep idle reads it, idle.rs::facts). It checks the CPUs' TSCs against an 11 ms bracket at start only, and checks the rate against no reference after its one 50 ms calibration. - That calibration reads 40 to 66 ppm low on the AMD bench in every boot log of the session, a bias and not noise. The T14's readings sit in two clusters, 285 ppm under and 59 ppm over its CPUID-stated rate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… a labelled experiment The planning architect's guidance (2026-10-28) is that a trustworthy default Linux is the baseline, and a hardware-policy setting is a controlled experiment beside it, never its replacement. The README now says so. The frequency request ToyOS makes (EPP 0x80 on the T14, performance on the AMD) is the experiment. The AMD's Linux on the HPET is its baseline. A Linux forced onto the TSC has its stability checks switched off, so it is no baseline. Four runs a side is where a row can first resolve, not a precision guarantee. The AMD clocksource record keeps the bench's default. Ten minutes of a steady TSC rate (1796.6248 MHz against the HPET and the ACPI PM timer) does not explain the boot-time watchdog's 1.7 ms over 502 ms, so that cause is the record's exit. The invariant-TSC finding leaves this PR for #1082, filed accurately: deep idle already reads the bit, and the gap is the system clock's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ords T14: the TSC counts 2419.2002 MHz against the HPET over 5 minutes, CPUID 15H's rate within 0.1 ppm, so the kernel's -285/+59 ppm readings are its own. AMD: in 5 of 30 boots' logs, a 1.7 ms step early in boot that no runtime probe reproduces, where ToyOS's one calibration also runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 2026-10-28 validation run at 2eb28ee, one ToyOS boot and two baseline Linux runs per bench, passed its row on both. It showed: - The AMD's baseline Linux boosts at 4,022 to 4,126 MHz, dithering by some 2% within any 50 ms, so the 1% plateau never formed and 84 rows read unsettled, at 0.5 s twice each. The governor steps the settle exists to catch are a quarter of the clock and more, so it now holds within 5%. - The format-boot refusal moves to the DATA follow-up. Neither bench's p4 is designated (the AMD's stamp was cleared before any ToyOS boot read it), so nothing reaches it until ToyOS designates DATA. - Why the AMD's Linux keeps time on the HPET. Over 30 boots' kernel logs its watchdog fired in 18. In 13, Linux's refined TSC calibration read 1799.54-1799.61 MHz, 1,630 ppm high. In 5, with a right calibration, a 1.7 ms step early in boot was seen, cause unknown. At runtime (tsc-probe, 15 min, 16 CPUs, idle gaps to 1 s) no CPU read behind another and no step passed 1.2 us. The README records it, and issues/the-amd-benchs-linux-reads-its-clock-through-a-syscall.md closes: the bench keeps its default, and the unexplained step is ToyOS's clock's concern (#1082). - The T14's default Linux requests 0x80002a04 (IA32_HWP_REQUEST, every CPU): EPP 0x80 and highest 0x2a, as ToyOS asks, and lowest 4 against ToyOS's 1. The README says so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review:
|
…es are the evidence's - A rate read low is a period kept long, so the AMD's clock gains about 5 s a day, and the T14's -285 ppm cluster about 25. - the-kernels-50-ms-tsc-calibration-misses-the-tscs-rate: the T14's readings are hundreds of ppm off, not tens. Its citation moves with it. - 345 log files; the ACPI PM run is 5 minutes; all but one calibration in the range given; 41 to 66 ppm; "2.6 s into boot in the one boot whose dmesg was kept". - Suggestions taken: the HPET-bracket inference, labelled, and an exit whose fallback is loud and whose runtime bound cannot repeat Linux's own miscalibration. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ecord cites it issues/ap-tsc-trail-is-assumed-and-never-checked.md owns cross-CPU agreement. It gains the AMD's tsc-probe warp result (no CPU behind another's last reading, within about 200 ns) and the 11 ms bracket smp now logs. The system-clock record cites it rather than restating it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
r1 response, head
|
Review r2:
|
A non-negative step each way bounds a pair's offset by the larger of its two worst steps; across the 15 pairs that is 342 cycles (cpu0<->cpu10), about 190 ns. One line rewrapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Orchestrator: the follow-up's one required fix is verified at da056ab. The cross-core bound is now the worst step across all pairs, 342 cycles (about 190 ns), and the title and wrap are corrected. Landing. |
Draft. Issues only, no code. The ToyOS clock records found while measuring the TSC for #1079, filed apart from it at the coordinator's request.
issues/the-system-clock-takes-the-tsc-on-one-reading-and-never-checks-it-again.md: the system clock never checks three things:idle.rs::facts);The AMD's 1.7 ms early-boot step in 5 of 30 Linux boots is the case it would miss. Its exit asks for a loud fallback and a runtime bound that cannot repeat Linux's own miscalibration.
issues/the-kernels-50-ms-tsc-calibration-misses-the-tscs-rate.md: that calibration reads 41 to 66 ppm low on the AMD, against 1796.6248 MHz measured over minutes against the HPET and the ACPI PM timer, so the clock gains about 5 s a day. The HPET bracketing is labelled as the likely cause. On the T14 it is −285 and +59 ppm off a CPUID-stated rate that measures right within 0.1 ppm.issues/ap-tsc-trail-is-assumed-and-never-checked.md(existing) gains the AMD's warp measurement: every pair's worst step positive, bounding each CPU's offset from CPU 0 by 342 cycles (about 190 ns). It also gains the 11 ms bracketsmpnow logs, and a citation to the clock record.Evidence: #1079's evidence branch
pr-1079,tsc/in r3 and r4.Checks: markdown only, so none ran. The files follow
issues/README.md's frontmatter, and each has an owner and an exit.🤖 Generated with Claude Code