HPA: Implement batch deallocation.

This saves O(n) mutex locks/unlocks during SEC flush.
This commit is contained in:
David Goldblatt
2021-01-04 19:43:08 -08:00
committed by David Goldblatt
parent f47b4c2cd8
commit 1944ebbe7f
3 changed files with 47 additions and 24 deletions

View File

@@ -13,6 +13,7 @@ struct pai_s {
bool (*shrink)(tsdn_t *tsdn, pai_t *self, edata_t *edata,
size_t old_size, size_t new_size);
void (*dalloc)(tsdn_t *tsdn, pai_t *self, edata_t *edata);
/* This function empties out list as a side-effect of being called. */
void (*dalloc_batch)(tsdn_t *tsdn, pai_t *self,
edata_list_active_t *list);
};