SmpAllocator becomes less efficient when more than 128 CPUs are trying to use the allocator. #23594
Labels
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
standard library
This issue involves writing Zig code for the standard library.
Milestone
Zig Version
commit dc090e9
Steps to Reproduce and Observed Behavior
zig/lib/std/heap/SmpAllocator.zig
Line 49 in dc090e9
if you use a computer with more than 128 CPUs (e.g. a dual-socket AMD Epyc 9965 has 768 CPUs (counting each thread as a CPU)), then the allocator will make all additional threads busy-wait when more than 128 threads are in the allocator at any time.
Expected Behavior
dynamically adjust to higher CPU counts instead of using a static array.
The text was updated successfully, but these errors were encountered: