Bug 24260 – GC creates too many threads when running with restricted CPU affinity

Status
NEW
Severity
minor
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-11-24T10:44:36Z
Last change time
2024-12-07T13:43:05Z
Assigned to
No Owner
Creator
Vladimir Panteleev
Moved to GitHub: dmd#17469 →

Comments

Comment #0 by dlang-bugzilla — 2023-11-24T10:44:36Z
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.)
Comment #1 by robert.schadek — 2024-12-07T13:43:05Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17469 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB