Repository navigation
metal: the ACPI rows wait from their own start, and counters admits the machine's own events - #1163
Conversation
…he machine's own events Two test defects the AMD bench's testcases boot showed under #1154 (938c4a7, 2026-11-03): idle_entered and acpi_hold gave up their wait for the ACPI server's start lines at a fixed time after boot (JOB_BOUND_MS less a tenth, 54 s), so a job begun late failed before it had looked. counters_metal's 10 s and acpi_counted's 30 s put them at 59.6 s and 62.8 s, and both ended "within 0ns". Each now waits served_log::SERVER_START, 30 s, from its own start: a liveness ceiling far past the server's start, which ended 12.1 s after boot on the T14 and 7.0 s on the AMD in those boots, so a job begun after it finds its line already served whatever the jobs before it took. counters_metal began its idle second only once the embedded controller had raised its first query, a machine event the job cannot cause. The AMD's controller is served (GPE 0x3) and raised none in the whole boot, so the job waited out its 10 s and failed; on the T14 a second boot query could land inside the idle second and red the row. No trigger the job could cause was found. As I read ACPI's embedded-controller interface (chapter 12), the controller sets SCI_EVT itself and the host has no command that asks it for a query; stimulating a GPE would have the test drive the chipset. So the claim narrows to what holds on every machine. The job waits only for the server's word on its controller. The judge holds that no line is stamped in the idle second but a first-time ACPI event, which the machine raised when it chose: acpiserver's "<query or GPE> taken for the first time" (now acpiserver_api::FIRST_TAKEN, which the server writes through) and the kernel's first fixed-hardware interrupt. It prints each such line it finds there instead of passing over it. Host test: idle_second_lines admits the T14's two first queries, the first interrupt and a first GPE, and refuses acpiserver's periodic count and a program's line in the second; a classifier admitting everything fails it. Closes issues/the-counters-rows-idle-second-can-hold-the-ecs-second-boot-query.md: its 0x4f inside the second is now reported, not red, by the narrowed claim. The T14 rows riding the AMD's boot stay with issues/a-metal-row-names-no-machine-so-another-benchs-boot-carries-it.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of #1163 at
|
counters_metal's new anchor, the server's word on its controller, comes before the namespace, idle and power-source lines of acpiserver's start (main.rs's negotiate, declare_idle, find_power, served_aml). On the T14, whose start ends about when the boot's jobs begin, those ordinary lines could land in the idle second and red the row. acpiserver now writes acpiserver_api::STARTED, the last line of its start on every machine, after served_aml. counters_metal waits for it under served_log's SERVER_START, and the separate 10 s ACPI_BOUND goes. FIRST_TAKEN is the one spelling: acpi_events_on_metal matched the suffix literally. idle_second_lines admits a first-time line only where the whole log holds its words once, so a first time said twice is refused; the host test covers it. issues/acpi-hold-gives-up-at-a-time-counted-from-boot-whatever-its-runner-was-given.md is closed: acpi_hold now waits from its own start, the record's exit. The pointer to it in the T14 retention record is replaced, and issues/acpiserver-lines-are-spelled-again-by-their-readers.md drops the spellings this PR moved into acpiserver-api. The same boot-counted deadline remains in ps2server_hold and tone_after_dc6, outside this change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ps2server_hold, tone_after_dc6 and acpi_counted gave up at a fixed time after boot (JOB_BOUND_MS less a tenth), so a job begun late failed before it looked, as idle_entered and acpi_hold did. Each now bounds its wait from its own start: - ps2server_hold and tone_after_dc6 wait for a line a service writes during its start (ps2server's probe end, tgl-display's DC6 allow) under served_log::START_LINE, the former SERVER_START renamed now that it is any service's start line. - acpi_counted's line comes at the end of the count interval in which the controller's first query fell, so it waits START_LINE and two intervals. The interval is now acpiserver_api::COUNT_INTERVAL, which the server's COUNTS takes. acpi_hold now waits for acpiserver_api::STARTED, the start's last line on every machine, where it waited for the power sources a machine without a battery never writes. TESTCASES_HELD's reason for running the members behind the hold (its boot-counted bound) is gone from its comment. No other job wait in tests/guest counts from boot; the other nanos_since_boot uses bound a span from now or measure one. The test runner's whole-list bound (test-runner's deadline) counts from boot by design: it is the list's deadline, not a job's wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…AMD's list r3 bounded acpi_counted's wait from its own start by START_LINE and two count intervals, 90 s. On the AMD bench, which it rides as a T14 row (issues/a-metal-row-names-no-machine-so-another-benchs-boot-carries-it.md), the controller raises no query, so it waited past the runner's 60.3 s list bound. The runner then ended the list inside it (exit -1), and the AMD's own idle_entered, acpi_hold and the members behind them never ran (r3's metal, both benches, 2026-11-04). A wait for an event that may never come cannot be bounded from the job's own start and still stay inside a list bound counted from boot. Bounding it right needs the runner to hand its jobs the bound it was given, or the rows to declare their bench as the record above asks. Until then acpi_counted keeps the rule it had, which ends it inside the base list bound. COUNT_INTERVAL goes back into the server, its one reader. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
r3's metal (81d479a, both benches) redded `counters` on both. The idle second, now begun at acpiserver's STARTED, held the kernel's TSC refinement report: `clock: over 1 s the TSC counted ...`, at 12.396 s on the T14. The clock writes that report at doubling spans after calibration, at times the job does not choose. The old first-query anchor started later and fell between two reports by chance. By the orchestrator's ruling the claim admits those reports too, and the row prints each one it finds there. They are identified by kernel::clock::TSC_REFINED, the report's head, which the kernel writes through and which the judge, faults.rs's hpet-stall reader and clock_report match on. Any other clock line, the step check's report among them, is still refused, and the host test covers both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The AMD bench's TSC steps 1.7 ms forward once a boot, in the first spell in which every CPU idles deep. counters_metal's idle second itself makes that spell, so the clock's report of the step (`clock: the TSC reads 1718866 ns from the chipset's counters ...`, 7.547 s in r3's AMD boot) lands inside it. The defect is tracked in issues/the-amd-benchs-tsc-steps-1-7-ms-forward-once-a-boot.md, and the row's claim is that ToyOS itself does not wake the idle machine. By the orchestrator's ruling the judge admits the report as the machine's own event and prints it, cites that record, and keeps refusing the clock's other lines, its slewing of the step among them. The report's head is kernel::clock::TSC_STEP_READ, which the kernel writes through. a_stepped_tsc_is_slewed_then_demoted now also requires the report, read through the constant, between the staged step and its slew. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow-up review of #1163 at
|
counters_metal's header listed what the row admits and said it refuses any other line, which stopped being true once the clock's reports were admitted; it now points at idle_second_lines, the admitted set's one home. counters_on_metal's doc says what a line-based row can hold, that nothing ToyOS writes on its own account lands in the idle second, not that ToyOS does not wake the machine. idle_second_lines' doc becomes a list, and TSC_REFINED's says the report is written by the first scheduler pass after each doubling span, which arms no timer of its own. Comments only; the checks and the kernel library compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test defects the AMD bench's
testcasesboot showed under #1154, fixed rather than recorded. The T14-only rows that ride the AMD's boot, and the AMD's row on the T14, stay withissues/a-metal-row-names-no-machine-so-another-benchs-boot-carries-it.md.Problem
idle_entered,acpi_hold,ps2server_holdandtone_after_dc6gave up their log wait at a fixed time after boot (JOB_BOUND_MSless a tenth, 54 s), so a job begun late failed before it looked. On the AMD at 938c4a7,idle_enteredandacpi_holdstarted at 59.6 s and 62.8 s and endedwithin 0ns, over lines the server had written at 6–7 s.countershung on an uncontrolled event.counters_metalbegan its idle second only once the embedded controller raised its first query. The AMD's controller raises none, so the job waited out 10 s and failed. On the T14 a later boot query could land in the idle second (issues/the-counters-rows-idle-second-can-hold-the-ecs-second-boot-query.md).Change
Waits from the job's own start.
served_log::START_LINE, 30 s, bounds a wait for a line a service writes during its start: a liveness ceiling, not a timing claim.idle_entered,acpi_hold,ps2server_holdandtone_after_dc6wait by it.acpi_holdnow waits foracpiserver_api::STARTED, not the power sources a machine without a battery never writes.acpi_countedkeeps its boot-counted rule (1d0d558). An own-start bound for a count the AMD never writes overran the runner's 60.3 s list bound there in r3, and ended the list inside it. Bounding it from its start needs the runner to hand jobs their remaining bound, which stays with the rows record.The end of the server's start, one spelling. acpiserver writes
acpiserver_api::STARTEDafterserved_aml, the last line of its start on every machine.counters_metalwaits for it underSTART_LINE, andACPI_BOUNDis gone.The
countersrow's claim, narrowed (orchestrator rulings). Nothing ToyOS writes on its own account lands in the idle second.idle_second_linesadmits, and the row prints, only:acpiserver_api::FIRST_TAKEN) and the kernel's first ACPI fixed-hardware interrupt, each only where the whole log holds its words once;kernel::clock::TSC_REFINED), written by a scheduler pass and arming no timer;kernel::clock::TSC_STEP_READ), which the AMD bench's deep idle provokes once a boot (issues/the-amd-benchs-tsc-steps-1-7-ms-forward-once-a-boot.md).Every other line is refused, the clock's slewing of a step and acpiserver's periodic count among them.
One spelling each. acpiserver writes
FIRST_TAKENandSTARTEDthroughacpiserver-api. The kernel writesTSC_REFINEDandTSC_STEP_READthroughkernel::clock. The judge,acpi_events_on_metal,clock_reportand the two QEMU clock tests match on those constants.Records.
issues/the-counters-rows-idle-second-can-hold-the-ecs-second-boot-query.mdandissues/acpi-hold-gives-up-at-a-time-counted-from-boot-whatever-its-runner-was-given.md.issues/acpiserver-lines-are-spelled-again-by-their-readers.mddrops the spellings moved intoacpiserver-api.Tests
Host:
checks::the_idle_second_admits_only_the_machines_own_linesrunsidle_second_linesover lines in the readbacks' own form.Controls, each red as intended:
clock:line;clock:line.QEMU:
a_stepped_tsc_is_slewed_then_demotednow requires the step report, read throughkernel::clock::TSC_STEP_READ.a_stalled_hpet_is_left_outreads the refinement report throughTSC_REFINED. Both pass at e80dee1.Also exit 0: clippy, acpiserver's and
acpiserver-api's host tests, andkernel's clock tests at e80dee1. The head 31d1c68 changes only comments, and its checks and the kernel library compile.Metal r5 at e80dee1, both benches:
counters' idle second passes with the step report admitted (7.635 s). It then fails at the T14's HWP lines.Evidence: https://github.com/ToyOSOrg/evidence/tree/653e90b25e9e54cd5fabf7409a443b84fdb77d46/pr-1163/metal-r5
counterspm_enablelines; the AMD has no HWP)acpi_server_eventsacpi_counted)acpi_tables_loadedidle_enteredps2server_armsdisplay_output_presentstgl-display)Every red is a row on the other bench's boot, under the rows record above.
Round evidence:
🤖 Generated with Claude Code