Engineering Notes Origin 2000
The Cleanup That Stopped Eight Processors
Removing an interrupt-flag drop that no test depended on took the eight-processor Origin 2000 from a login to none in five boots. Restoring it gave eleven of eleven.
In mid-September 2026 our emulated Origin 2000 stopped reaching a login. IRIX started, brought up all eight processors, and then every one of them reported that it had not seen a scheduler clock interrupt. The console printed nothing else for the rest of the run. Five cold boots, none reached a login.
The cause was a cleanup of ours that deleted two small pieces of bookkeeping. We had checked, correctly, that interrupt delivery was right without them and that no test failed. Both statements were true, and the machine stopped anyway.
What was removed
QEMU’s execution loop keeps a per-processor flag meaning “an interrupt is pending”. While that flag is up, the loop takes QEMU’s single big lock on every pass, whether or not the processor can actually take the interrupt. With the flag clear, the loop skips the lock.
The R10000 models had a small addition. When the loop looked at a pending interrupt and found it masked, the model lowered the flag, and the places where the guest could unmask re-raised it. It changed no architectural state: Cause, Status, the exception taken and the instruction it was taken at were identical with or without it. We were trimming the changes we carry in shared QEMU code, and this one had no failing test behind it. It went, along with two TLB-flush changes.
On the R10000 a masked pending line is an ordinary condition. The model starts the Count and Compare timer at reset, and its interrupt line goes up about 47 virtual seconds into a boot. A guest that never writes Compare and never opens that mask bit carries the line until shutdown. Without the drop, every pass through the loop for every processor took the big lock, for the rest of the run. With eight processor threads, that is eight contenders for one lock on every pass.
The first diagnosis, and why it did not hold
We wrote the fix on this reading: a rejected interrupt left its flag raised through every window in which an interrupt could not be taken, including the exception-level and interrupt-enable windows, so eight threads fought over the lock. Restoring the two calls gave a clear result: eleven of eleven cold boots reached an IRIX login with no lost-clock warning at all, nine of them with all eight processors. The other two lost processors to a separate discovery defect.
Our notes held a second, more specific theory: IRIX never writes the Compare register,
leaves the timer interrupt masked, and so carries a latched line it can never take. The failing
machine does not fit it. We took the monitor’s register dump
four times across the first warnings, and every processor showed Status 0x0000ffa1: interrupts
enabled, the timer’s mask bit open, neither exception level set. The timer line was pending on all
eight. It was not masked. It was deliverable, and the flag was up, so the next pass through the loop
should have taken it. It stayed untaken for tens of seconds.
So the masked-line theory is contradicted by the sample. What the restore established is narrower: with the flag permanently raised the machine stopped, and with the drop in place it ran.
We cleared the TLB-flush changes that went out in the same cleanup separately. On the branch tip, one boot with them restored and the flag change left out warned sixteen times and never got past the kernel’s first line. One boot the other way round went on with the startup. That is one boot each, enough to point at the flag and not enough to rule anything else out.
The lock count that no test had
The reason no test failed is that no test counted the right thing. A delivery test asks whether an interrupt arrives. The cost of this change is lock traffic. Our restore added a test that does 100,000 writes to the Status register, each of which ends a translation block and so costs one pass through the loop, first with no line pending and then with the timer line standing. It counts big-lock acquisitions using QEMU’s synchronisation profiler.
| no line pending | masked line pending | |
|---|---|---|
| without the drop | 1,285 | 100,532 |
| with the drop | 810 | 79 |
A further check runs every R10000-family machine against a lock-acquisition budget: the Origin 200 with 200,159 acquisitions against a budget of 20,000 without the drop, and the Origin 2000 with 801,964 against 80,000.
What we have not settled
Two things stay open.
Why a deliverable line went untaken for tens of seconds is not known. The drop removes the symptom and leaves the starvation mechanism unexplained. Heavy big-lock traffic from another source, for example many processors polling Hub registers, might bring the stall back with the drop in place. A trace of lock ownership and interrupt decisions during a failing boot without the drop would settle it. That trace is what would reopen the question.
Nothing here is about hardware. The R10000 manual says a pending interrupt bit stays asserted until it is taken, and the model does that. The drop is QEMU bookkeeping with no counterpart on the processor, and it is kept for what it costs the host, not for anything the machine does. Guest progress per virtual second under multi-threaded emulation depends on host load and the number of processor threads, and the R10000 defines no rate the model could violate.
Our standing rule: code that can open an R10000 processor’s own interrupt window by changing the interrupt-enable, exception-level or mask bits must re-raise the flag if a pending line has become deliverable, or the line waits for its next edge.
Where it landed
The removal landed on 12 September 2026 and the restore on 13 September. A count taken partway through the reliability campaign that followed stood at fifteen logins in fifteen cold boots. Scored over every console it kept once it finished, the campaign reached a login on 29 of 30 cold boots, against zero in five before the fixes. The timeline has the dates.