Probably fix TLB shootdown "diagonal" livelock.

Diagonal as in

Thread A        Thread B
Send to B       Send to A
Wait for B      Wait for A.

I haven't reproduced this bug, but this should fix it, since the wait
steps now checks the local percpu block for pending TLB shootdowns onto
itself.
This commit is contained in:
4lDO2
2024-07-24 22:38:25 +02:00
parent 49b94047a8
commit 4158d899b5
+1
View File
@@ -2898,6 +2898,7 @@ impl<'guard, 'addrsp> Flusher<'guard, 'addrsp> {
}
while self.state.ackword.load(Ordering::SeqCst) < affected_cpu_count {
PercpuBlock::current().maybe_handle_tlb_shootdown();
core::hint::spin_loop();
}