summaryrefslogtreecommitdiff
path: root/items.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2018-07-11 19:35:14 -0700
committerdormando <dormando@rydia.net>2018-08-03 13:02:16 -0700
commit954f4e044b3f1641da66910e4564cd91dfb83712 (patch)
tree778598b0ab6976fb2726b8caaa9291a4922014e8 /items.c
parent8c629d398914b5669d9b719d2d271dfe7b453221 (diff)
downloadmemcached-954f4e044b3f1641da66910e4564cd91dfb83712.tar.gz
split storage writer into its own thread
trying out a simplified slab class backoff algorithm. The LRU maintainer individually schedules slab classes by time, which leads to multiple wakeups in a steady state as they get out of sync. This algorithm more simply skips that class more often each time it runs the main loop, using a single scheduled sleep instead. if it goes to sleep for a long time, it also reduces the backoff for all classes. if we're barely awake it should be fine to poke everything.
Diffstat (limited to 'items.c')
-rw-r--r--items.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/items.c b/items.c
index 0aefaf0..01ce2a4 100644
--- a/items.c
+++ b/items.c
@@ -1538,7 +1538,6 @@ static void *lru_maintainer_thread(void *arg) {
void *storage = arg;
if (storage != NULL)
sam = &slab_automove_extstore;
- int x;
#endif
int i;
useconds_t to_sleep = MIN_LRU_MAINTAINER_SLEEP;
@@ -1592,20 +1591,6 @@ static void *lru_maintainer_thread(void *arg) {
}
int did_moves = lru_maintainer_juggle(i);
-#ifdef EXTSTORE
- // Deeper loop to speed up pushing to storage.
- if (storage) {
- for (x = 0; x < 500; x++) {
- int found;
- found = lru_maintainer_store(storage, i);
- if (found) {
- did_moves += found;
- } else {
- break;
- }
- }
- }
-#endif
if (did_moves == 0) {
if (backoff_juggles[i] != 0) {
backoff_juggles[i] += backoff_juggles[i] / 8;