Write faults: a block just written rests before it is guarded again (VICTORY_GUARD_REST=0: not), a fault opens the view it came through alone (VICTORY_OPEN_ONE_VIEW=0: every view), guarded blocks kept as bits
A book of the faults (VICTORY_FAULT_BOOK=<file>, diagnostics) says of the dorm: 586 faults a frame on 900 blocks, 245 of them on a block that had faulted in the same frame already, 220 within 3 ms of the refresh that made the block read-only; 69 ms a frame of the title's threads, of which 6 with the guards' lock and 63 waiting for it. What is held under it is mostly VirtualProtect (5 us and more in the game's process, one at a time whoever asks: a bench found 14 threads no faster than one). - A block a write fault opened is left open by the refreshes of the next 3 ms and told as written at each. - The other views of its page stay read-only, not clean. - The sets of guarded, clean, absent and aliased blocks are bits, a range is looked at by words; the lock is let go between the runs a refresh guards; a fault that finds its block open takes no lock; the record of the title's views is read by many threads at once; the kernel is not asked about memory known to be a guarded view. Run faults-2 (A/B of both switches, 20 phases of 10 s in the dorm): faults 601 -> 391 a frame, blocks made read-only 928 -> 407, the title's threads 27.5 -> 15.8 ms a frame in them (69 before), frame 64.8 -> 62.5 ms. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
bc83b16387
commit
0578afffbb
6 files changed
+569
-123
No files matched your search
@@ -3485,7 +3485,8 @@ impl Shadow {
|
||||
fn update_free(&self, from: usize, to: usize) -> usize {
|
||||
if self.watched.load(Ordering::Relaxed) != NOT_WATCHED {
|
||||
if let Some((now, written)) = crate::watch::writes(from, to, true) {
|
||||
let guarded = crate::watch::guarded(from, to);
|
||||
// (A range whose blocks rest after a write has no guard now.)
|
||||
let guarded = crate::watch::guarded(from, to) || self.watched.load(Ordering::Relaxed) == GUARDED;
|
||||
self.watched.store(if guarded { GUARDED } else { 1 }, Ordering::Relaxed);
|
||||
let copied = self.copy_stale(from, to, now, &written);
|
||||
self.refresh_check(from, to);
|
||||
|
||||
Reference in new issue
Block a user