rts: Determine max_n_capabilities at RTS startup
Previously the maximum number of capabilities supported by the RTS was statically capped at 256. However, this bound is uncomfortably low given the size of today's machine. While supporting unbounded, fully-dynamic adjustment would be nice, it is complex and so instead we do something simpler: Probe the logical core count at RTS startup and use this as the static bound for the rest of our execution. This should avoid users running into the capability limit on large machines while avoiding wasting memory on a large capabilities array for most users and keeping complexity at bay. Addresses #25560. (cherry picked from commit 71f050b7)
Showing
- docs/users_guide/using-concurrent.rst 3 additions, 2 deletionsdocs/users_guide/using-concurrent.rst
- rts/Capability.c 29 additions, 5 deletionsrts/Capability.c
- rts/Capability.h 4 additions, 2 deletionsrts/Capability.h
- rts/RtsSymbols.c 1 addition, 0 deletionsrts/RtsSymbols.c
- rts/Schedule.c 4 additions, 3 deletionsrts/Schedule.c
- rts/include/rts/Config.h 1 addition, 0 deletionsrts/include/rts/Config.h
- rts/include/rts/Threads.h 4 additions, 0 deletionsrts/include/rts/Threads.h
Loading
Please register or sign in to comment