summaryrefslogtreecommitdiff
path: root/items.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-05-29 22:51:20 -0700
committerdormando <dormando@rydia.net>2017-05-29 22:51:20 -0700
commitd184b4b08f92d0171c8a3a3f03fa22e33c6aaa55 (patch)
tree146248ce6468a6c5c4a6e19b24816adb823c5aa0 /items.h
parent7d72a92cf11bbea0aa2b40e277eb9c2c44b8ad41 (diff)
downloadmemcached-d184b4b08f92d0171c8a3a3f03fa22e33c6aaa55.tar.gz
LRU crawler scheduling improvements
when trying to manually run a crawl, the internal autocrawler is now blocked from restarting for 60 seconds. the internal autocrawl now independently schedules LRU's, and can re-schedule sub-LRU's while others are still running. should allow much better memory control when some sub-lru's (such as TEMP or WARM) are small, or slab classes are differently sized. this also makes the crawler drop its lock frequently.. this fixes an issue where a long crawl happening at the same time as a hash table expansion could hang the server until the crawl finished. to improve still: - elapsed time can be wrong in the logger entry - need to cap number of entries scanned. enough set pressure and a crawl may never finish.
Diffstat (limited to 'items.h')
-rw-r--r--items.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/items.h b/items.h
index 6683bf7..fd573aa 100644
--- a/items.h
+++ b/items.h
@@ -4,6 +4,7 @@
#define TEMP_LRU 192
#define CLEAR_LRU(id) (id & ~(3<<6))
+#define GET_LRU(id) (id & (3<<6))
/* See items.c */
uint64_t get_cas_id(void);