summaryrefslogtreecommitdiff
path: root/items.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2015-09-28 17:32:49 -0700
committerdormando <dormando@rydia.net>2015-11-18 23:14:35 -0800
commit004e221190cd5521593db5f462fd51f998a3265f (patch)
tree77759597774735be97f420142a449c874cfe6207 /items.h
parent826403dd5e83bfe9cdf4feb412ad7e5ef983f9e5 (diff)
downloadmemcached-004e221190cd5521593db5f462fd51f998a3265f.tar.gz
slab mover rescues valid items with free chunks
During a slab page move items are typically ejected regardless of their validity. Now, if an item is valid and free chunks are available in the same slab class, copy the item over and replace it. It's up to external systems to try to ensure free chunks are available before moving a slab page. If there is no memory it will simply evict them as normal. Also adds counters so we can finally tell how often these cases happen.
Diffstat (limited to 'items.h')
-rw-r--r--items.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/items.h b/items.h
index b091fa0..f47de8f 100644
--- a/items.h
+++ b/items.h
@@ -14,6 +14,8 @@ void do_item_update(item *it); /** update LRU time to current and reposition *
void do_item_update_nolock(item *it);
int do_item_replace(item *it, item *new_it, const uint32_t hv);
+int item_is_flushed(item *it);
+
/*@null@*/
char *item_cachedump(const unsigned int slabs_clsid, const unsigned int limit, unsigned int *bytes);
void item_stats(ADD_STAT add_stats, void *c);