liyinshu has uploaded this change for review.

View Change

Free not only first entry
Currently lru_reap_impl only check whether first entry of lq->q can be reclaimable.
But sometimes, the first entry can not be reclaimed for a long time, then we have
to malloc several million new mdcache_entry_t. The size of mdcache_entry_t is 1200 bytes,
then the memory of mdcache_entry_t is serveral GB, which should be improved. So we check
all the entries of lq_q, whether can be reclaimed, to avoid malloc so many mdcache_entry_t.

Change-Id: If733ff96f88cd660b43cf3cfbf22680ef5dcf6e7

Signed-off-by: liyinshu <liyinshu@bytedance.com>
Change-Id: I85a842bc6b5f9dc6dc106b03d871d823fa7b2dae
---
M src/FSAL/Stackable_FSALs/FSAL_MDCACHE/mdcache_lru.c
1 file changed, 99 insertions(+), 66 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/08/535308/1

To view, visit change 535308. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I85a842bc6b5f9dc6dc106b03d871d823fa7b2dae
Gerrit-Change-Number: 535308
Gerrit-PatchSet: 1
Gerrit-Owner: liyinshu <liyinshu@bytedance.com>
Gerrit-MessageType: newchange