HPA: add size-exclusion functionality.

I.e. only allowing allocations under or over certain sizes.
This commit is contained in:
David Goldblatt
2020-09-04 18:29:28 -07:00
committed by David Goldblatt
parent 484f04733e
commit 534504d4a7
11 changed files with 84 additions and 16 deletions

View File

@@ -49,7 +49,7 @@ pa_shard_init(tsdn_t *tsdn, pa_shard_t *shard, emap_t *emap, base_t *base,
bool
pa_shard_enable_hpa(pa_shard_t *shard, hpa_t *hpa, size_t ps_goal,
size_t ps_alloc_max) {
size_t ps_alloc_max, size_t small_max, size_t large_min) {
ps_goal &= ~PAGE_MASK;
ps_alloc_max &= ~PAGE_MASK;
@@ -57,7 +57,7 @@ pa_shard_enable_hpa(pa_shard_t *shard, hpa_t *hpa, size_t ps_goal,
ps_alloc_max = ps_goal;
}
if (hpa_shard_init(&shard->hpa_shard, hpa, &shard->edata_cache,
shard->ind, ps_goal, ps_alloc_max)) {
shard->ind, ps_goal, ps_alloc_max, small_max, large_min)) {
return true;
}
shard->ever_used_hpa = true;