summaryrefslogtreecommitdiff
path: root/items.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2022-08-19 10:48:31 -0700
committerdormando <dormando@rydia.net>2022-08-25 20:43:32 -0700
commit7b7ffaecf6ab0b21829664f4b2ef4366926abc33 (patch)
tree9a630a880d37c0396351b335342760868e231634 /items.c
parent3d6d74a340c3eb27777f96937bead823b4901753 (diff)
downloadmemcached-7b7ffaecf6ab0b21829664f4b2ef4366926abc33.tar.gz
re-allow aggressive slab mover for global pages
fixes failing tests and scenarios where a lot of memory is freed up at once.
Diffstat (limited to 'items.c')
-rw-r--r--items.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/items.c b/items.c
index 9cee07e..e5347cc 100644
--- a/items.c
+++ b/items.c
@@ -1669,7 +1669,13 @@ static void *lru_maintainer_thread(void *arg) {
LOGGER_LOG(l, LOG_SYSEVENTS, LOGGER_SLAB_MOVE, NULL,
src, dst);
}
- last_automove_check = current_time;
+ // dst == 0 means reclaim to global pool, be more aggressive
+ if (dst != 0) {
+ last_automove_check = current_time;
+ } else if (dst == 0) {
+ // also ensure we minimize the thread sleep
+ to_sleep = 1000;
+ }
}
}
pthread_mutex_unlock(&lru_maintainer_lock);