Skip to content

Pcpkey - #791

Merged
techomancer merged 4 commits into
mainfrom
pcpkey
Nov 20, 2026
Merged

Pcpkey#791
techomancer merged 4 commits into
mainfrom
pcpkey

Conversation

@techomancer

Copy link
Copy Markdown
Owner

No description provided.

techomancer and others added 4 commits November 19, 2026 19:49
The IP30 PROM menu and fx run with IE and IM set but every HEART source
disabled, so no Cause.IP line ever rises. Their loops look idle, and a
uniprocessor park waited only for a line or a stop: after the warm-up
the machine slept for good.

A uniprocessor park now ends after 100 ms with no line; later parks last
one 1 ms slice until an interrupt wakes one again. IRIX's clock tick
always ends a park first, so a settled IRIX guest is unchanged. Counted
under wake_slice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A code page was keyed by its physical frame. Each node of an IP27 or IP35
machine has its own address space, so each node had its own page pool and
compile queue, and a memory controller that moved a bank had to flush every
CPU's compiled code: dozens of flushes while a PROM sizes memory.

A page is now keyed by the memory it holds. Every device that holds
runnable memory (a RAM bank, a PROM, a flash part) takes an id from one
counter (CodeBank), and a bus answers BusDevice::code_page(addr) with the
bank and the page within it, the bank's own write counter, and for RAM and
PROM a pointer to the page in the bank's storage. The pool finds a page by
that key. The direct-mapped frame table stays as a lock-free cache, one
per address space, and each page records where each CPU of the pool last
reached it. A page no bank names (MMIO) is keyed by its address within its
address space, as every page was.

So code follows its bank through a remap: the request every CPU takes
after one (REQUEST_JIT_REMAP, was REQUEST_JIT_FLUSH) now only forgets the
CPU's addresses. Addresses that reach the same bytes share a page, and a
cached and an uncached fetch that decode to different bytes get a page
each without a split flag in the page. On PROM memory sizing the Octane
takes 94 such requests, the Tezro 16 and the Indy 12, with no flush.

Every CPU of a machine now shares one pool, one compile queue and one body
of code (share_pool, for IP27 and IP35); nodes with different processor
modules keep a pool each. Compile workers read RAM and PROM pages in the
bank's storage, by key; a flash page is read through the bus of a CPU that
reached it, and the bus is asked for the key before and after the read.

The Bridge did not forward the write counter of the flash behind it, so
the Octane's PROM ran as code that never changes; it forwards the counter
and the page question now. The IP27 node flash and the BaseIO flash had no
counter and get one, bumped by every write cycle.

j2 pcp shows a page's bank, offset and per-CPU frames; j2 status counts
remaps.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On a two-node Bedrock machine the node that does not hold number 0 kept
its own RAM mapped at node-field-0 addresses 0x1fc00000-0x1fffffff, the
window where its boot flash sits before memory is up. The two CPUs then
saw different pages at the same physical address: IRIX processes on the
second node read zero pages and died with memory faults, and bulk I/O
ended in a kernel panic.

NodeDecode::map_banks now maps the zero holder's banks there once the
node has memory behind the window; flash stays local only where it has
none. Verified on Origin 3200 and Onyx 3000 with two C-bricks, both CPUs
and jitv2 on: clean boot, raw disk reads and /usr/lib checksum sweeps
match the host.

j2 status gains a "shared pages" line: pages reached by more than one
CPU, and how many of them at different addresses.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Each CPU had its own table. `loadsym` goes to the selected CPU and the
breakpoint commands to every CPU, so on a machine with more than one CPU
`b <symbol>` failed with "unknown symbol" from the CPUs that had no map,
right after `sym <symbol>` resolved it.

CpuMonitor now hands the first CPU's table to the others.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@techomancer
techomancer merged commit 91137e3 into main Nov 20, 2026
15 checks passed
@techomancer
techomancer deleted the pcpkey branch November 20, 2026 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant