Skip to content

RFC nfsd: convert nfsd DRC code to use list_lru infrastructure

Jeff Layton linux-nfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3nfsd: don't try to reuse an expired DRC entry off the listfs/nfsd/nfscache.c+4 -324 replies
2/3list_lru: add a new LRU_SKIP_REST lru_status value and handlinginclude/linux/list_lru.h mm/list_lru.c+5 -12 replies
3/3nfsd: convert DRC code to use list_lrufs/nfsd/nfscache.c+66 -284 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/3] nfsd: convert nfsd DRC code to use list_lru infrastructure

This patchset converts the LRU list in the nfsd duplicate reply cache to use the new list_lru infrastrucure. Note that this is based on top of the patch that I sent to Bruce earlier this week that fixes the svc_cacherep direct reclaim bug. I'm sending this as an RFC since I'm not 100% convinced it's an improvement.

The majorly unintuitive thing about list_lru that I've found is that you can't call call list_lru_del from list_lru_walk. So, you need different routines to free an object depending on how it's being freed.

Using list_lru also means extra spinlocking since we'd be moving to a per-node LRU, but that's probably not a big deal since all of this is done under the cache_lock anyway.

In any case, here's what a conversion to list_lru would look like...

Discuss!

Jeff Layton (3):
nfsd: don't try to reuse an expired DRC entry off the list
list_lru: add a new LRU_SKIP_REST lru_status value and handling
nfsd: convert DRC code to use list_lru

 fs/nfsd/nfscache.c       | 130 +++++++++++++++++++++++++----------------------
 include/linux/list_lru.h |   2 +
 mm/list_lru.c            |   4 +-
 3 files changed, 75 insertions(+), 61 deletions(-)
Signature · 1 line
1.8.4.2