Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Ben Gamari's avatar
    a1791350
    rts: Determine max_n_capabilities at RTS startup · a1791350
    Ben Gamari authored and Andreas Klebinger's avatar Andreas Klebinger committed
    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)
    a1791350
    History
    rts: Determine max_n_capabilities at RTS startup
    Ben Gamari authored and Andreas Klebinger's avatar Andreas Klebinger committed
    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)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.