From 97b52b18667cfce5d23234a421130c6f1b616b7a Mon Sep 17 00:00:00 2001 From: dormando Date: Mon, 18 Dec 2017 23:29:47 -0800 Subject: extstore: prefill global page pool with extstore the slab page mover algo would fill memory to evicting for a few seconds before jumping to life and shoveling some pages into the global pool. swore I was going to fix this post-release, but I had a moment of inspiration after finding some code from another branch that did half the work. After a bunch of stupid bugs it seems to work. -o slab_automove_freeratio=0.N is now an option. This is *percentage of total memory*, so don't set it too high. --- slabs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'slabs.h') diff --git a/slabs.h b/slabs.h index 447033c..1516f86 100644 --- a/slabs.h +++ b/slabs.h @@ -10,6 +10,8 @@ */ void slabs_init(const size_t limit, const double factor, const bool prealloc, const uint32_t *slab_sizes); +/** Call only during init. Pre-allocates all available memory */ +void slabs_prefill_global(void); /** * Given object size, return id to use when allocating/freeing memory for object -- cgit v1.2.1