diff options
author | dormando <dormando@rydia.net> | 2017-01-09 00:32:22 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2017-01-22 19:47:50 -0800 |
commit | e87ab394f383acd43076ee1127f1b403882263db (patch) | |
tree | 8a491be958a6d0f1b8c5be77a0b244b26eb6064b /items.h | |
parent | 312ae0d2382f970b556b64bc63a383f83954ab2d (diff) | |
download | memcached-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.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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]; |