From 954f4e044b3f1641da66910e4564cd91dfb83712 Mon Sep 17 00:00:00 2001 From: dormando Date: Wed, 11 Jul 2018 19:35:14 -0700 Subject: 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. --- storage.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'storage.h') diff --git a/storage.h b/storage.h index c267692..875962c 100644 --- a/storage.h +++ b/storage.h @@ -1,7 +1,9 @@ #ifndef STORAGE_H #define STORAGE_H -int lru_maintainer_store(void *storage, const int clsid); +int start_storage_write_thread(void *arg); +void storage_write_pause(void); +void storage_write_resume(void); int start_storage_compact_thread(void *arg); void storage_compact_pause(void); void storage_compact_resume(void); -- cgit v1.2.1