mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-22 15:41:15 +00:00
Revert "the effect of yield_now() was just less competition in find_victim, prove by replacing it with busy loop"
This reverts commit 6124ad694a.
This commit is contained in:
@@ -892,13 +892,7 @@ impl PageCache {
|
||||
self.next_evict_slot.fetch_add(1, Ordering::Relaxed) % self.slots.len();
|
||||
match (last_slot_idx, next_idx) {
|
||||
(Some(x), y) if x > y => {
|
||||
#[inline(never)]
|
||||
fn dont_compete_with_other_find_victim_for_a_while() {
|
||||
for _ in 0..1_000_000 {
|
||||
std::hint::spin_loop();
|
||||
}
|
||||
}
|
||||
dont_compete_with_other_find_victim_for_a_while();
|
||||
tokio::task::yield_now().await;
|
||||
}
|
||||
(None | Some(_), _) => {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user