Revert "Do not dehugify when purging"

This reverts commit 16c5abd1cd.
This commit is contained in:
Slobodan Predolac 2025-09-29 09:41:51 -07:00
parent 6cc6a4ce51
commit 8ce81ac2f7
6 changed files with 54 additions and 3 deletions

View file

@ -433,11 +433,18 @@ hpa_purge_actual_unlocked(
hpa_range_accum_init(&accum, vec, len);
for (size_t i = 0; i < batch_sz; ++i) {
hpdata_t *to_purge = batch[i].hp;
/* Actually do the purging, now that the lock is dropped. */
if (batch[i].dehugify) {
shard->central->hooks.dehugify(
hpdata_addr_get(to_purge), HUGEPAGE);
}
void *purge_addr;
size_t purge_size;
size_t total_purged_on_one_hp = 0;
while (hpdata_purge_next(
batch[i].hp, &batch[i].state, &purge_addr, &purge_size)) {
to_purge, &batch[i].state, &purge_addr, &purge_size)) {
total_purged_on_one_hp += purge_size;
assert(total_purged_on_one_hp <= HUGEPAGE);
hpa_range_accum_add(