Split the expire lock into expire and per-lru list locks.
The lock order is lru->exp lock, so that the timer_index can be safely examined while holding only the lru lock, eliminating the need for the separate OC_F_ONLRU flag. The critical trick is that in EXP_Touch() the lru_lock is sufficient: We just move the object around on the lru list, we don't add or delete it. This hopefully reduces lock contention on these locks.
Showing
Please register or sign in to comment