--- a/src/cpu_set.rs +++ b/src/cpu_set.rs @@ -42,17 +42,18 @@ } #[cfg(target_pointer_width = "64")] -pub const MAX_CPU_COUNT: u32 = 128; +pub const MAX_CPU_COUNT: u32 = 256; #[cfg(target_pointer_width = "32")] pub const MAX_CPU_COUNT: u32 = 32; const SET_WORDS: usize = (MAX_CPU_COUNT / usize::BITS) as usize; -// TODO: Support more than 128 CPUs. +// TODO: Support more than 256 CPUs. // The maximum number of CPUs on Linux is configurable, and the type for LogicalCpuSet and // LogicalCpuId may be optimized accordingly. In that case, box the mask if it's larger than some -// base size (probably 256 bytes). +// base size (probably 256 bytes). AMD EPYC has 128C/256T, Threadripper PRO 96C/192T — +// 256 covers current hardware. #[derive(Debug)] pub struct LogicalCpuSet([AtomicUsize; SET_WORDS]);