Permalink
Commits on Sep 3, 2012
  1. @dormando

    Add some mild thread documentation

    since reading the code is probably incredibly confusing now.
    dormando committed Sep 3, 2012
  2. @dormando

    don't wait on condition without holding the lock

    freebsd9 is the only platform that apparently cares about this.
    dormando committed Sep 3, 2012
  3. @dormando
  4. @dormando

    remove global stats lock from item allocation

    This doesn't reduce mutex contention much, if at all, for the global stats
    lock, but it does remove a handful of instructions from the alloc hot path,
    which is always worth doing.
    
    Previous commits possibly added a handful of instructions for the loop and for
    the bucket readlock trylock, but this is still faster than .14 for writes
    overall.
    dormando committed Sep 1, 2012
  5. @dormando

    item locks now lock hash table buckets

    expansion requires switching to a global lock temporarily, so all buckets have
    a covered read lock.
    
    slab rebalancer is paused during hash table expansion.
    
    internal item "trylocks" are always issued, and tracked as the hash power
    variable can change out from under it.
    dormando committed Aug 18, 2012
  6. @dormando

    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.
    dormando committed Aug 18, 2012
Commits on Sep 1, 2012
  1. @trondn

    Issue 286: --disable-coverage drops "-pthread" option

    -pthread was added as part of setting up the gcov options
    trondn committed Sep 1, 2012
Commits on Jul 30, 2012
  1. @dormando

    call mutex_unlock() when we use mutex_lock()

    use both #define's when using the spinlock version of our locks. not all locks
    are designed to be that way, so this doesn't touch the whole thing.
    dormando committed Jul 30, 2012
  2. @dormando

    whitespace fix for freebsd

    I dunno why it litters .orgs then tries to run them. I'm not a magician.
    dormando committed Jul 30, 2012
  3. @dormando

    remove unused variable

    fix warning in new gcc.
    dormando committed Jul 30, 2012
  4. @dormando

    stupid whitespace thing pulls in dead files

    I don't care why it happened, just don't whitespace check the README files
    anymore.
    dormando committed Jul 30, 2012
  5. @dormando
  6. @dormando

    fix some binary.t stuff

    I broke 'em earlier
    dormando committed Jul 30, 2012
  7. @emcconville @dormando
  8. @tmaesaka @dormando

    Use Markdown for README.

    tmaesaka committed with dormando Jul 11, 2012
  9. @uzzz @dormando
  10. @dormando
Commits on Jul 29, 2012
  1. @dormando

    totally destroy test caches

    someone pointed out that cache_destroy wasn't freeing the cache_t pointer.
    
    memcached itself never destroys a cache it creates, so this is fine, but it's
    fixed for completeness...
    dormando committed Jul 29, 2012
  2. @yuryur @dormando
  3. @dormando

    If we're preallocating memory, prealloc slab pages

    I'll probably get in trouble for removing DONT_PREALLOC_SLABS
    
    ... however tons of people like using the -L option, which does nothing under
    linux. It should soon do *something* under linux, and when it does they'll
    report the same errors of not being able to store things into certain slab
    classes.
    
    So just give them a useful error and bail instead.
    dormando committed Jul 29, 2012
  4. @dormando

    Error and exit if we don't have hugetlb support

    I imagine host people on linux run this and then get both thumbs stuck up
    their noses when weird bugs happen. Lets start by not lying to them.
    dormando committed Jul 29, 2012
  5. @fanquake @dormando

    Fix doc/protocol.txt typo

    (I removed the "honoured" fix as this is american english -ed)
    fanquake committed with dormando May 21, 2012
  6. @dormando
Commits on Jul 27, 2012
  1. @dormando

    Remove USE_SYSTEM_MALLOC define

    bitrotted. only existed to prove a point. can add it back in better later, or
    use a storage engine if we ever get on 1.6.
    dormando committed Jul 27, 2012
  2. @dormando

    remove rebalancer's race condition

    slabs_reassign() calls now attempt to lock, return busy if thread is already
    moving something.
    dormando committed Jul 24, 2012
  3. @dormando

    automove levels are an int instead of bool now

    also fix a bug causing slab rebalance thread to spin instead of waiting on the
    condition... duhr.
    dormando committed Jul 16, 2012
  4. @dormando

    slab rebalancing from random class

    specifying -1 as the src class for a slabs reassign will pick the first
    available, rolling through the list on each request (so as to not bias against
    the smaller classes).
    
    So if you're in a hurry and have to move memory into class 5, you may now mash
    it without thinking.
    dormando committed Jul 16, 2012
  5. @dormando

    split slab rebalance and automove threads

    slab rebalancer now chillaxes on a signal and waits a lot less time when
    hitting a busy item. automove is its own thread now, and signals rebal when
    necessary.
    
    when entering the command "slabs reassign 1 2" it should start moving a
    page instantly.
    dormando committed Jul 16, 2012
  6. @dormando

    remove end_page_ptr business from slabs

    slab memory assignment used to lazily split a new page into chunks as memory
    was requested. now it doesn't, so drop all the related code.
    
    Cuts the memory assignment hotpath a tiny bit, so that's exciting.
    dormando committed Jul 15, 2012
  7. @dormando

    pre-split slab pages into slab freelists

    slab freelists used to be malloc'ed arrays. then they were changed into a
    freelist. now we pre-split newly assigned/moved pages into a slabs freelist
    instead of lazily pulling pointers as needed.
    
    The loop is pretty darn direct and I can't measure a performance impact of
    this relatively rare event.
    
    In doing this, slab reassign can move memory without having to wait for a
    class to chew through its recently assigned page first.
    dormando committed Jul 15, 2012
  8. @SpamapS @dormando

    Avoid race condition in test by re-trying

    (ed note: yes it doesn't check for a NULL and die after 20 times. this should
    mitigate until we can do better with writing the pidfile)
    SpamapS committed with dormando Jul 27, 2012
Commits on Feb 2, 2012
  1. @swills @dormando

    - Fix inline issue with older compilers (gcc 4.2.2)

    ed note: this needs to be redone in memcached.h as a static inline, or changed
    to a define.
    swills committed with dormando Feb 2, 2012
  2. @dustin @dormando
  3. @dormando

    fix glitch with flush_all <future>

    reported by jhpark. items at the bottom of the LRU would be popped for sets if
    flush_all was set for the "future" but said future hadn't arrived yet.
    item_get handled this correctly so the flush would not happen, but items at
    the bottom of the LRU would be reclaimed early.
    
    Added tests for this as well.
    dormando committed Feb 2, 2012
Commits on Jan 28, 2012
  1. @dustin

    Skip SASL tests unless RUN_SASL_TESTS is defined.

    This fails for various stupid platform-specific things.  The SASL code
    can be working correctly, but not in a way that is completely
    predictable on every platform (for example, we may be missing a
    particular auth mode).
    dustin committed Jan 28, 2012