jemalloc/test
Dmitry Ilvokhin b64d7815b7 Keep hugepages in use as long as we can
Hugepages are really hard to get. Currently, we are waiting until we
fill memory region up with data to at least `hpa_hugification_threshold`
and then wait for `hpa_hugify_delay_ms` before we hugify pageslab. For
this reason it seems wasteful to treat hugified pageslabs in the same
way as non-hugified ones. Based on that observation two ideas come to
mind.

We should try to prioritize placing allocation on hugified pageslab to
get performance improvements from hugepage usage immediately. While
there are maybe a better (in terms of fragmentation) pageslab currently
available, empty space on a hugepage just sitting there, waiting for
a better allocation to appear, which might never happen. This unused
memory on a hugepage is counted towards out usage anyway, we better
use it for good.

Same reasoning is applicable for purging prioritization. If we purge
hugepage (`madvise(..., MADV_DONTNEED)`) we'll need to start over again
to assemble it back: filling it up and waiting. Moreover, we might never
assemble hugepage again, because kernel doesn't have continuous 2 MiB
regions anymore. Instead, we should purge non-huge pageslabs as long as
we can, because they are much cheaper to purge and does not provide any
performance benefits.
2024-11-22 08:13:45 -08:00
..
analyze Tcache batching: Plumbing 2024-05-22 10:30:31 -07:00
include/test Add batching to arena bins. 2024-05-22 10:30:31 -07:00
integration Make headers self-contained by fixing #includes 2023-07-14 09:06:32 -07:00
src Enable a few additional warnings for CI and fix the issues they uncovered 2023-08-11 13:56:23 -07:00
stress increase the ncached_max in fill_flush test case to 1024 2024-08-06 13:16:09 -07:00
unit Keep hugepages in use as long as we can 2024-11-22 08:13:45 -08:00
test.sh.in Print test error messages in color when stderr is a terminal 2023-07-13 13:03:23 -07:00