summaryrefslogtreecommitdiff
path: root/globals.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2011-12-18 22:53:10 -0800
committerdormando <dormando@rydia.net>2011-12-19 17:53:22 -0800
commit10698bae63a034c14d2fdbc3027a1308ce90faba (patch)
tree7a147adb894d0fa0ca3a2165424a8f516a6aa320 /globals.c
parent40b7b4b2b62d67062eb536cb5395e74172c0c31c (diff)
downloadmemcached-10698bae63a034c14d2fdbc3027a1308ce90faba.tar.gz
slab reassignment
Adds a "slabs reassign src dst" manual command, and a thread to safely process slab moves in the background. - slab freelist is now a linked list, reusing the item structure - is -o slab_reassign is enabled, an extra background thread is started - thread attempts to safely free up items when it's been told to move a page from one slab to another. -o slab_automove is stubbed. There are some limitations. Most notable is that you cannot repeatedly move pages around without first having items use up the memory. Slabs with newly assigned memory work off of a pointer, handing out chunks individually. We would need to change that to quickly split chunks for all newly assigned pages into that slabs freelist. Further testing is required to ensure such is possible without impacting performance.
Diffstat (limited to 'globals.c')
-rw-r--r--globals.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/globals.c b/globals.c
index 7d7b2a3..a01e370 100644
--- a/globals.c
+++ b/globals.c
@@ -21,3 +21,5 @@ volatile rel_time_t current_time;
/** exported globals **/
struct stats stats;
struct settings settings;
+struct slab_rebalance slab_rebal;
+volatile int slab_rebalance_signal;