Check that a thaw fetches the armed ranges of its regions without the freeze lock, which the review found untested.

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>
This commit is contained in:
chrg6
2026-11-13 20:00:02 -05:00
parent 92121a11e8
commit 0eee849948
3 changed files with 22 additions and 2 deletions

View File

@@ -29,6 +29,8 @@ SCENARIOS = {
'loser': ('loser', {}),
'concurrent': ('concurrent', {}),
'thaw': ('thaw', {}),
'thaw_unlocked': ('thaw_unlocked', {}),
'locked_thaw': ('thaw_unlocked', LOCKED),
'mapping': ('mapping', {}),
'release': ('release', {}),
'release_join': ('release_join', {}),