Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit 60f11a9

Browse files
committed
Resize waitlist to ensure it is large enough for all the application cores; this fixed memcached failures we were seeing at high numbers of cores
1 parent aa86b14 commit 60f11a9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/lineup/src/mutex.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ use core::hint::spin_loop;
66
use core::ptr;
77
use core::sync::atomic::{AtomicUsize, Ordering};
88

9+
use kpi::process::MAX_CORES;
10+
911
use crate::threads::ThreadId;
1012
use crate::tls2::{Environment, ThreadControlBlock};
1113

@@ -51,7 +53,7 @@ impl Mutex {
5153
lwp_ptr: Cell::new(ptr::null()),
5254
is_kmutex,
5355
is_spin,
54-
waitlist: ArrayQueue::new(64),
56+
waitlist: ArrayQueue::new(MAX_CORES),
5557
counter: CachePadded::new(AtomicUsize::new(0)),
5658
},
5759
}

0 commit comments

Comments
 (0)