diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2021-03-04 10:16:07 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-03-08 18:24:42 -0500 |
commit | 47d6acd3be1fadc0c59b7b4d4e105242c0ae0b90 (patch) | |
tree | 8696b191951e5bd9fbb5441f4eb0ba8e5ab23084 /rts/Capability.h | |
parent | daa6363f49df0dceb2c460da500461e564aa9ea2 (diff) | |
download | haskell-47d6acd3be1fadc0c59b7b4d4e105242c0ae0b90.tar.gz |
rts: Use a separate free block list for allocatePinned
The way in which allocatePinned took blocks out of the nursery was
leading to horrible fragmentation in some workloads.
The strategy now is that a separate free block list is reserved for each
capability and blocks are taken from there. When it's empty the global
SM lock is taken and a fresh block of size PINNED_EMPTY_SIZE is allocated.
Fixes #19481
Diffstat (limited to 'rts/Capability.h')
-rw-r--r-- | rts/Capability.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/Capability.h b/rts/Capability.h index df486829ea..14ba9ef2d7 100644 --- a/rts/Capability.h +++ b/rts/Capability.h @@ -93,6 +93,8 @@ struct Capability_ { bdescr *pinned_object_block; // full pinned object blocks allocated since the last GC bdescr *pinned_object_blocks; + // empty pinned object blocks, to be allocated into + bdescr *pinned_object_empty; // per-capability weak pointer list associated with nursery (older // lists stored in generation object) |