Reuse a uniform word while the update gap still covers it #397

Merged
SkippySteve merged 1 commit from fix/ub-memo-on-gap into main 2026-11-08 00:03:07 +00:00
SkippySteve commented 2026-11-07 23:37:18 +00:00 (Migrated from github.com)

Summary

  • Follow-up to the note on #373. The word memo and #322's gap cache both answer whether an inline update covers a uniform word. #322 is still open and does not apply on main (main is 184564d, which has #373 and not the gap). This puts that gap in and hangs the memo on it.
  • A 4-byte word is reused while the gap covers it, its page is unstamped, and the read is in the same submission. A word an update overlaps is applied from the list and is not kept.
  • A stream copy of a range an update does overlap is reused while that update list is unchanged (ub_list_epoch, the gap's generation, bumped when an update is added or dropped) and the copy is still in the recording's stream. The memo's own tail scan (ub_tail_clear, ub_prune_gen) is gone.

Test plan

  • python -I -B tests/test_ub_gap.py
  • python -I -B tests/test_ub_memo.py
  • Kokiri: fps, and a one-frame flash count
## Summary - Follow-up to the note on #373. The word memo and #322's gap cache both answer whether an inline update covers a uniform word. #322 is still open and does not apply on main (main is `184564d`, which has #373 and not the gap). This puts that gap in and hangs the memo on it. - A 4-byte word is reused while the gap covers it, its page is unstamped, and the read is in the same submission. A word an update overlaps is applied from the list and is not kept. - A stream copy of a range an update does overlap is reused while that update list is unchanged (`ub_list_epoch`, the gap's generation, bumped when an update is added or dropped) and the copy is still in the recording's stream. The memo's own tail scan (`ub_tail_clear`, `ub_prune_gen`) is gone. ## Test plan - [x] `python -I -B tests/test_ub_gap.py` - [x] `python -I -B tests/test_ub_memo.py` - [ ] Kokiri: fps, and a one-frame flash count
Commenting is not possible because the repository is archived.
No description provided.