Skip to content

Commit 37e9021

Browse files
committed
[libpas] Decrease untagged medium-seg min-objs from 11 to 7
https://bugs.webkit.org/show_bug.cgi?id=328674 rdar://190851334 Reviewed by Yusuke Suzuki. Practically this means raising the maximum medium-segregated object size from 11776B to 18432B. Before: ``` Page Configs: page payload align min-objs max obj handicap granule view-cache +MTE Medium Segregated 131072B 131072B 512B 11 11776B 1.05 16384B cap 12 0 ``` after: ``` Page Configs: page payload align min-objs max obj handicap granule view-cache +MTE Medium Segregated 131072B 131072B 512B 7 18432B 1.05 16384B cap 12 0 ``` This is motivated by the 16k size class, which includes a number of object-types like MarkedBlocks. Prior to this change, these were allocated from bitfit heaps. This is less than ideal especially for aligned 16k objects which often go down annoying failure routes, e.g. because each view only keeps track of doesn’t remember whether whether there’s a large enough slot, without regards to whether or not it’s sufficiently aligned. Segregated heaps avoid this issue entirely. I previously raised PAS_MIN_OBJECTS_PER_PAGE from 6 to 12 (and later 11) largely for the benefit of small heaps; now that we can more easily control the heap-cutoffs separately, we can bring the medium-segregated cap back upwards again. Empirically this seems to have minor top-line benefits for performance and memory. No new tests since no behavior change. * Source/bmalloc/libpas/src/libpas/bmalloc_heap_config.h: MOPP 7->11 Canonical link: https://commits.webkit.org/324727@main
1 parent b92d6a6 commit 37e9021

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Source/bmalloc/libpas/src/libpas/bmalloc_heap_config.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ PAS_BEGIN_EXTERN_C;
4141

4242
#define BMALLOC_SMALL_SHARING_SHIFT 4
4343

44-
#define BMALLOC_SMALL_SEGREGATED_MIN_OBJECTS_PER_PAGE PAS_DEFAULT_MIN_OBJECTS_PER_PAGE
45-
#define BMALLOC_MEDIUM_SEGREGATED_MIN_OBJECTS_PER_PAGE PAS_DEFAULT_MIN_OBJECTS_PER_PAGE
44+
#define BMALLOC_SMALL_SEGREGATED_MIN_OBJECTS_PER_PAGE 10
45+
#define BMALLOC_MEDIUM_SEGREGATED_MIN_OBJECTS_PER_PAGE 7
4646
#define BMALLOC_SMALL_BITFIT_MIN_OBJECTS_PER_PAGE PAS_DEFAULT_MIN_OBJECTS_PER_PAGE
4747
#define BMALLOC_MEDIUM_BITFIT_MIN_OBJECTS_PER_PAGE PAS_DEFAULT_MIN_OBJECTS_PER_PAGE
4848
#define BMALLOC_MARGE_BITFIT_MIN_OBJECTS_PER_PAGE PAS_DEFAULT_MIN_OBJECTS_PER_PAGE

0 commit comments

Comments
 (0)