mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
memory.c mem_thaw calls lazy_release_regions before it takes frz_lock, so the copy a file read's thaw needs (the buffer's armed ranges with stale bytes) no longer holds up the other threads' faults, freezes, thaws and arms. All 20 scenarios of tests/lazy_fetch_check.py passed with that call taken out: the thaw scenario reaches the same end state through thaw_begin_locked's lazy_drop_region_locked under the lock. The new thaw_unlocked scenario has a thread thaw a page of a range armed with stale bytes while the fetch takes 300 ms, and freezes another region meanwhile: the freeze returns at once, and took 300 ms with the call taken out. locked_thaw runs it with NX2NAVI_WB_LAZY_UNLOCKED=0, where the freeze waits for the fetch as in 0.10.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>