Re: Source code, lru_lock vs former cache_lock

2023-02-27 Thread dormando
Hey, That old "item_cachedump" command is deprecated. The locking is fine; it's actually only looking at the COLD_LRU instead of walking all of them like the lru_crawler. I'd rather remove the command entirely than do any further work on it; it has a hard limit on how many keys it can dump, it

Source code, lru_lock vs former cache_lock

2023-02-27 Thread Slawomir Pryczek
Hi, I was reading about LRU lock a bit and have a question regarding item_cachedump unsigned int id = slabs_clsid; id |= COLD_LRU; pthread_mutex_lock(_locks[id]); 1. Why in this code we're binary adding COLD_LRU, while for example in lru_crawler's code we're just using slab class IDs. This way