diff options
author | dormando <dormando@rydia.net> | 2011-10-02 01:23:46 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2011-11-09 16:06:08 -0800 |
commit | bab9acd115828e44176a3671bd65089d6fdeff85 (patch) | |
tree | 9230ad6621ab3bed65778000730c2c162cb72ca7 /items.h | |
parent | 45e0e9500f11783e227898c7af66a4b5c0057f41 (diff) | |
download | memcached-bab9acd115828e44176a3671bd65089d6fdeff85.tar.gz |
move hash calls outside of cache_lock
been hard to measure while using the intel hash (since it's very fast), but
should help with the software hash.
Diffstat (limited to 'items.h')
-rw-r--r-- | items.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -6,11 +6,11 @@ item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_tim void item_free(item *it); bool item_size_ok(const size_t nkey, const int flags, const int nbytes); -int do_item_link(item *it); /** may fail if transgresses limits */ -void do_item_unlink(item *it); +int do_item_link(item *it, const uint32_t hv); /** may fail if transgresses limits */ +void do_item_unlink(item *it, const uint32_t hv); void do_item_remove(item *it); void do_item_update(item *it); /** update LRU time to current and reposition */ -int do_item_replace(item *it, item *new_it); +int do_item_replace(item *it, item *new_it, const uint32_t hv); /*@null@*/ char *do_item_cachedump(const unsigned int slabs_clsid, const unsigned int limit, unsigned int *bytes); @@ -19,8 +19,8 @@ void do_item_stats(ADD_STAT add_stats, void *c); void do_item_stats_sizes(ADD_STAT add_stats, void *c); void do_item_flush_expired(void); -item *do_item_get(const char *key, const size_t nkey); -item *do_item_get_nocheck(const char *key, const size_t nkey); -item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime); +item *do_item_get(const char *key, const size_t nkey, const uint32_t hv); +item *do_item_get_nocheck(const char *key, const size_t nkey, const uint32_t hv); +item *do_item_touch(const char *key, const size_t nkey, uint32_t exptime, const uint32_t hv); void item_stats_reset(void); extern pthread_mutex_t cache_lock; |