Cache extra extents in the dirty pool from ecache_alloc_grow

This commit is contained in:
Guangli Dai 2025-01-27 23:09:51 -08:00
parent 2651071172
commit e7aa4e4cac
3 changed files with 96 additions and 12 deletions

View file

@ -410,7 +410,14 @@ TEST_BEGIN(test_decay_never) {
/* Verify that each deallocation generates additional dirty pages. */
size_t pdirty_prev = get_arena_pdirty(arena_ind);
size_t pmuzzy_prev = get_arena_pmuzzy(arena_ind);
expect_zu_eq(pdirty_prev, 0, "Unexpected dirty pages");
/*
* With limit_usize_gap enabled, some more extents
* are cached in the dirty pool, making the assumption below
* not true.
*/
if (!sz_limit_usize_gap_enabled()) {
expect_zu_eq(pdirty_prev, 0, "Unexpected dirty pages");
}
expect_zu_eq(pmuzzy_prev, 0, "Unexpected muzzy pages");
for (unsigned i = 0; i < sizeof(sizes)/sizeof(size_t); i++) {
dallocx(ptrs[i], flags);