diff options
author | dormando <dormando@rydia.net> | 2012-08-17 19:51:46 -0700 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2012-09-03 00:35:54 -0700 |
commit | 2db1bf462c67c66323850272acd0f2b60d6e62ec (patch) | |
tree | 67d3e05a99ba5219c5c74364e74d7db4c8ead531 /items.h | |
parent | ad27588391e4f5f85f07f9d734334ade4cc5dbb0 (diff) | |
download | memcached-2db1bf462c67c66323850272acd0f2b60d6e62ec.tar.gz |
alloc loop now attempts an item_lock
Fixes a few issues with a restructuring... I think -M was broken before,
should be fixed now. It had a refcount leak.
Now walks up to five items from the bottom in case of the bottomost items
being item_locked, or refcount locked. Helps avoid excessive OOM errors for
some oddball cases. Those happen more often if you're hammering on a handful
of pages in a very large class size (100k+)
The hash item lock ensures that if we're holding that lock, no other thread
can be incrementing the refcount lock at that time. It will mean more in
future patches.
slab rebalancer gets a similar update.
Diffstat (limited to 'items.h')
-rw-r--r-- | items.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2,7 +2,7 @@ uint64_t get_cas_id(void); /*@null@*/ -item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_time_t exptime, const int nbytes); +item *do_item_alloc(char *key, const size_t nkey, const int flags, const rel_time_t exptime, const int nbytes, const uint32_t cur_hv); void item_free(item *it); bool item_size_ok(const size_t nkey, const int flags, const int nbytes); |