Hi All, I want to implement CLOCK replacement policy in memcached to reduce the contention problem. I remove the mutex_lock(&cache_lock); and replace it with a fine grain lock for each hv i.e., item_lock(hv);
My problem is that I have deadlock in my implementation. This deadlock is not because of multihtreading since I have it even with one thread in the server. I have debugged the code and I am sure that the deadlock is not because of the item_lock(hv) and STATS_LOCK(). I do not know the whole code of the memcached but I know replacement policy part almost well. I have a high level question. Does the implementation for other parts of memcached (excluding replacement policy) count on mutex_lock(&cache_lock) and mutex_unlock(&cache_lock) of the cache management policy. I think there is a deadlock in other lock variables such as slabs_lock and cache->mutex,.... Would you please help me. For example let me know what I should consider if I remove the mutex_lock(&cache_lock). Any idea or hint is welcomed. Thanks a lot. Best Regards, Saeid -- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
