• Poul-Henning Kamp's avatar
    Split the expire lock into expire and per-lru list locks. · 195fa50c
    Poul-Henning Kamp authored
    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.
    195fa50c
cache_lck.c 5.34 KB