in memory LRU, try to meet the deficit in one go

parent e18826da
...@@ -3171,9 +3171,11 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru) ...@@ -3171,9 +3171,11 @@ fellow_cache_lru_work(struct worker *wrk, struct fellow_cache_lru *lru)
fellow_cache_lru_seg_evict_locked(fcs, fellow_cache_lru_seg_evict_locked(fcs,
&alloc, lru); &alloc, lru);
AZ(pthread_mutex_unlock(&fco->mtx)); AZ(pthread_mutex_unlock(&fco->mtx));
AZ(pthread_mutex_unlock(&lru->lru_mtx));
AN(buddy_return_ptr_extent(rets, &alloc)); AN(buddy_return_ptr_extent(rets, &alloc));
fco = NULL; fco = NULL;
if (rets->size < lru->fc->membuddy->deficit)
continue;
AZ(pthread_mutex_unlock(&lru->lru_mtx));
break; break;
} }
if (fcs->state == FCO_INCORE) { if (fcs->state == FCO_INCORE) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment