Symmetrize deferred-work execution by moving it from arena to PAC

This commit is contained in:
guangli-dai 2026-06-28 14:43:04 -07:00
parent 7ce8b9165d
commit 916d6081ee
5 changed files with 168 additions and 76 deletions

View file

@ -250,7 +250,15 @@ pa_shard_set_deferral_allowed(
}
void
pa_shard_do_deferred_work(tsdn_t *tsdn, pa_shard_t *shard) {
pa_shard_do_deferred_work(
tsdn_t *tsdn, pa_shard_t *shard, pac_purge_eagerness_t eagerness) {
/*
* The PAC result is only consumed on the application notification path,
* which calls pac_do_deferred_work directly. This facade just drives the
* work, so the result stays local.
*/
pac_deferred_work_result_t result;
pac_do_deferred_work(tsdn, &shard->pac, eagerness, &result);
if (pa_shard_uses_hpa(shard)) {
hpa_shard_do_deferred_work(tsdn, &shard->hpa);
}