[Issue 24260] New: GC creates too many threads when running with restricted CPU affinity
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Nov 24 10:44:36 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24260
Issue ID: 24260
Summary: GC creates too many threads when running with
restricted CPU affinity
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: dlang-bugzilla at thecybershadow.net
Currently, the GC decides on the number of threads to create (for parallel
marking) by querying the information in CPUID.
This is not ideal, because a process may be created with a CPU/core affinity
restricting which CPUs/cores it may use, e.g. using the "taskset" utility. In
this case, it will create too many threads.
It should instead use the information provided from the OS, in the same way
that std.parallelism.totalCPUs does. (totalCPUs should probably be moved to
Druntime.)
--
More information about the Digitalmars-d-bugs
mailing list