Re: eliminating the taking lock for cqi_freelist

2010-08-18 Thread ilnarb
--- thread.c.orig 2010-04-03 11:07:16.0 +0400 +++ thread.c2010-08-18 13:03:50.0 +0400 @@ -11,7 +11,8 @@ #include string.h #include pthread.h -#define ITEMS_PER_ALLOC 64 +#define CACHE_LINE_SIZE 64 +#define ITEMS_PER_ALLOC 256 /* An item in the connection queue. */

Re: eliminating the taking lock for cqi_freelist

2010-08-18 Thread ilnarb
Some little bit changes: Using the fact that dispatcher keep balance between threads while dispatch new connections, we can move out freelist into conn_queue without any problem with unbalanced size of free items on each conn_queue. Also I eliminate tailing while .. free code in cq_push in my

eliminating the taking lock for cqi_freelist

2010-08-17 Thread ilnarb
I suggest you to eliminate taking of the lock on cqi_freelist. In order to it we should done all work on cqi_freelist by one thread -- dispatcher thread in memcached. I made some changes in queue code, including improvements for cache line. It will work on any platform. There are patch file (diff

Re: eliminating the taking lock for cqi_freelist

2010-08-17 Thread dormando
Can you resubmit as a unified diff? On Tue, 17 Aug 2010, ilnarb wrote: I suggest you to eliminate taking of the lock on cqi_freelist. In order to it we should done all work on cqi_freelist by one thread -- dispatcher thread in memcached. I made some changes in queue code, including