Skip to content

Commit

Permalink
Resize waitlist to ensure it is large enough for all the application …
Browse files Browse the repository at this point in the history
…cores; this fixed memcached failures we were seeing at high numbers of cores
  • Loading branch information
hunhoffe committed Jul 30, 2023
1 parent aa86b14 commit 60f11a9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/lineup/src/mutex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ use core::hint::spin_loop;
use core::ptr;
use core::sync::atomic::{AtomicUsize, Ordering};

use kpi::process::MAX_CORES;

use crate::threads::ThreadId;
use crate::tls2::{Environment, ThreadControlBlock};

Expand Down Expand Up @@ -51,7 +53,7 @@ impl Mutex {
lwp_ptr: Cell::new(ptr::null()),
is_kmutex,
is_spin,
waitlist: ArrayQueue::new(64),
waitlist: ArrayQueue::new(MAX_CORES),
counter: CachePadded::new(AtomicUsize::new(0)),
},
}
Expand Down

0 comments on commit 60f11a9

Please sign in to comment.