summaryrefslogtreecommitdiff
path: root/items.h
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2017-01-09 00:32:22 -0800
committerdormando <dormando@rydia.net>2017-01-22 19:47:50 -0800
commite87ab394f383acd43076ee1127f1b403882263db (patch)
tree8a491be958a6d0f1b8c5be77a0b244b26eb6064b /items.h
parent312ae0d2382f970b556b64bc63a383f83954ab2d (diff)
downloadmemcached-e87ab394f383acd43076ee1127f1b403882263db.tar.gz
Do LRU-bumps while already holding item lock
item_get() would hash, item_lock, fetch item. consumers which can bump the LRU would then call item_update(), which would hash, item_lock, then update the item. Good performance bump by inlining the LRU bump when it's necessary.
Diffstat (limited to 'items.h')
-rw-r--r--items.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/items.h b/items.h
index cc89a61..8f0f78a 100644
--- a/items.h
+++ b/items.h
@@ -42,7 +42,7 @@ void item_stats_sizes_add(item *it);
void item_stats_sizes_remove(item *it);
bool item_stats_sizes_status(void);
-item *do_item_get(const char *key, const size_t nkey, const uint32_t hv, conn *c);
+item *do_item_get(const char *key, const size_t nkey, const uint32_t hv, conn *c, const bool do_update);
item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv, conn *c);
void item_stats_reset(void);
extern pthread_mutex_t lru_locks[POWER_LARGEST];