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.
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.
Add human parseable strings to the errors for slabs ressign. Also prevent reassigning memory to the same source and destination.
Adds a "slabs reassign src dst" manual command, and a thread to safely process slab moves in the background. - slab freelist is now a linked list, reusing the item structure - is -o slab_reassign is enabled, an extra background thread is started - thread attempts to safely free up items when it's been told to move a page from one slab to another. -o slab_automove is stubbed. There are some limitations. Most notable is that you cannot repeatedly move pages around without first having items use up the memory. Slabs with newly assigned memory work off of a pointer, handing out chunks individually. We would need to change that to quickly split chunks for all newly assigned pages into that slabs freelist. Further testing is required to ensure such is possible without impacting performance.
Old code was unfinished, had no test coverage, and not quite what we'll end up with in the future. Slab reassignment will happen in earnest soon, but for now we should stop confusing users.
(dustin) I made some changes to the original growth code to pass in the required size.
The subcommand is not necessarily a null terminated string (in the case of the binary protocol, it certainly isn't). The subcommand would not be recognized due to strcmp() failing. Tested with both text and binary protocols.
…ome wasteful function calls (more to come).
…straction by the callback.
This + previous patch slightly reduce user CPU time, especially during heavy evictions. git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@739 b0b603af-a30f-0410-a34e-baf09ae79d0b
slabs_alloc() internally calls slabs_clsid(), so an eviction case would crawl the list of slab classes three times. git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@738 b0b603af-a30f-0410-a34e-baf09ae79d0b
Initial support for solaris. git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@724 b0b603af-a30f-0410-a34e-baf09ae79d0b
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@596 b0b603af-a30f-0410-a34e-baf09ae79d0b
new files, not the modified ones.) git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@509 b0b603af-a30f-0410-a34e-baf09ae79d0b
…tespace git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@492 b0b603af-a30f-0410-a34e-baf09ae79d0b
git-svn-id: http://code.sixapart.com/svn/memcached/trunk/server@468 b0b603af-a30f-0410-a34e-baf09ae79d0b