diff options
author | dormando <dormando@rydia.net> | 2018-07-11 19:35:14 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2018-08-03 13:02:16 -0700 |
commit | 954f4e044b3f1641da66910e4564cd91dfb83712 (patch) | |
tree | 778598b0ab6976fb2726b8caaa9291a4922014e8 /thread.c | |
parent | 8c629d398914b5669d9b719d2d271dfe7b453221 (diff) | |
download | memcached-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 'thread.c')
-rw-r--r-- | thread.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -144,6 +144,7 @@ void pause_threads(enum pause_thread_types type) { lru_crawler_pause(); #ifdef EXTSTORE storage_compact_pause(); + storage_write_pause(); #endif case PAUSE_WORKER_THREADS: buf[0] = 'p'; @@ -155,6 +156,7 @@ void pause_threads(enum pause_thread_types type) { lru_crawler_resume(); #ifdef EXTSTORE storage_compact_resume(); + storage_write_resume(); #endif case RESUME_WORKER_THREADS: pthread_mutex_unlock(&worker_hang_lock); |