diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/next-daemon.md | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/docs/next-daemon.md b/docs/next-daemon.md index 00f66cf8..55921027 100644 --- a/docs/next-daemon.md +++ b/docs/next-daemon.md @@ -1743,7 +1743,7 @@ cores (ReleaseFast). the copy's p99 is 7.8 ms and a rollback's 17 ms: a register holding a terminal's whole grid (`%` then `y` in a shell's text, 2 MB after the flood) is copied whole by every speculation. Registers could be pinned - as file texts are; left as found. + as file texts are. (Done since: the follow-ups below.) - **No local regression.** `pardes-perf-live --live`, A and the new tty interleaved A B A ... A (4 runs of the new one, 5 of A) on the perf cores; the median of the runs' p50s, new/A, present and core: @@ -1782,12 +1782,8 @@ Not done, and why: - Text reads outside `buildRows` (a pointer selection's copy in tty mode, 9P's screen reads) do not ask for the rows; 9P's are the authority's anyway. -- **A hazard for part A, not fixed here.** The rollback copy follows a - view's stale slot (above). If a stale pointer lands on a live allocation - that a speculation then writes in place, the rollback puts the old bytes - back over that allocation's new owner. Emptying a slot's pointers when - its view goes live (views.zig `unpark`) would end it; the copy skipping - the live slot instead diverged, so part of it is still read. +- **A hazard for part A** (fixed since, below): the rollback copy followed + a view's stale slot. - Echo prediction (phase 6): a key into a terminal waits a round trip. - A replica steps every output step of the authority's (bytes-less), about 2000 a second under a flood, each a core step. @@ -1796,6 +1792,40 @@ Not done, and why: - The other agent wires it in: the tty and GUI hosts, `Screens` per attached peer, and a replica frontend drawing after `screen`. +Follow-ups (2026-10-29): +- **A live view's slot keeps no pointer.** When a view goes live (`to`, + `close`, `only`, and `drawOthers` putting the live one back), its parked + share is emptied (views.zig `emptied`): it held the pointers it handed + the live fields (a column tag's text, a chord's argument, the + presentation's) until it parked again, and the copy, walking every + slot, saved and put back whatever memory had since taken their place. + A pane's share holds no pointer but its selections, which `unpark` + already hands over. A test frees a tag's text under the stale slot, + hands its memory to another allocation, writes it under a held copy and + puts the copy back: it fails without the fix. +- **Registers and location rows are pinned, not copied.** A register's + values and joined text, and a file's location rows (with the ones an + edit dropped and a query's saved), are replaced whole and never written, + so the copy pins them as it does a file's text, freed raw. Rows pin + whole with what each owns (its path, its colours: `pinnedDeep`). In the + harness at 30 ms the big copies were not the register but a file's + location rows, 5 to 6 MB after the flood. ReleaseFast, 20 seeds, three + clients, p99: copy 5.1 ms to 0.22 ms at 30 ms (0.19 to 0.20 ms at 80 and + 207); rollback 14.9 to 9.5 ms at 30 ms (1.3 to 1.4 ms at 80 and 207). + What is left of a rollback's tail is the replay's digests: half the + harness's CPU is Wyhash over the whole core at every replayed unit, the + pinned blobs included (part A's digest). Hashing a pinned blob once, + while it lives, would take most of it. +- **The live perf harness ends what it starts.** Every process a live run + starts inherits its private runtime directory: after each cell, and in + the cleanup every path takes, the harness sends TERM, then KILL, to each + whose environment names it (`liveSweep`). With a wrapper that leaves a + daemon-kept detached session (as the remote agent's client-live.sh + does), the old harness left three sessions and their daemon a run; this + one leaves none. The gate's baselines are recorded again from base (main + and the new perf.zig), and .scratch/daemon/base/pardes-perf-live rebuilt + from it. + ## Phase 6: upgrade notes Built 2026-10-29 (`src/upgrade.zig`, the tty and GUI hosts, `daemon.zig`, |
