summaryrefslogtreecommitdiff
path: root/rts/Capability.h
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-03-04 10:16:07 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-08 18:24:42 -0500
commit47d6acd3be1fadc0c59b7b4d4e105242c0ae0b90 (patch)
tree8696b191951e5bd9fbb5441f4eb0ba8e5ab23084 /rts/Capability.h
parentdaa6363f49df0dceb2c460da500461e564aa9ea2 (diff)
downloadhaskell-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.h2
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)