mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 21:39:58 -04:00
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:
@@ -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', {}),
|
||||
|
||||
Reference in New Issue
Block a user