HPA: Make slab sizes and maxes configurable.

This allows easy experimentation with them as tuning parameters.
This commit is contained in:
David Goldblatt
2020-09-04 15:22:47 -07:00
committed by David Goldblatt
parent 1c7da33317
commit bf025d2ec8
7 changed files with 37 additions and 10 deletions

View File

@@ -13,6 +13,8 @@ extern bool opt_abort;
extern bool opt_abort_conf;
extern bool opt_confirm_conf;
extern bool opt_hpa;
extern size_t opt_hpa_slab_goal;
extern size_t opt_hpa_slab_max_alloc;
extern const char *opt_junk;
extern bool opt_junk_alloc;
extern bool opt_junk_free;

View File

@@ -123,7 +123,8 @@ bool pa_shard_init(tsdn_t *tsdn, pa_shard_t *shard, emap_t *emap, base_t *base,
* This isn't exposed to users; we allow late enablement of the HPA shard so
* that we can boot without worrying about the HPA, then turn it on in a0.
*/
bool pa_shard_enable_hpa(pa_shard_t *shard, hpa_t *hpa);
bool pa_shard_enable_hpa(pa_shard_t *shard, hpa_t *hpa, size_t ps_goal,
size_t ps_alloc_max);
/*
* We stop using the HPA when custom extent hooks are installed, but still
* redirect deallocations to it.