Skip to content

sunrpc: cache infrastructure scalability improvements

Jeff Layton linux-nfs lkml 2 versions – In review

Get series with b4
b4 am [email protected] change-id 20260220-sunrpc-cache-fe4cd44413d3

Versions newest first

  1. v2 Latest4 patches 1 replyIn review
  2. v13 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Don't spinlock around rp->next_seqno updates
- Fix potential cache_request leak in cache_release()
- Link to v1: https://lore.kernel.org/r/[email protected]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4sunrpc: fix cache_request leak in cache_releasenet/sunrpc/cache.c+21 -50 replies
2/4sunrpc: convert queue_lock from global spinlock to per-cache-detail lockinclude/linux/sunrpc/cache.h net/sunrpc/cache.c+24 -240 replies
3/4sunrpc: convert queue_wait from global to per-cache-detail waitqueueinclude/linux/sunrpc/cache.h net/sunrpc/cache.c+5 -40 replies
4/4sunrpc: split cache_detail queue into request and reader listsinclude/linux/sunrpc/cache.h net/sunrpc/cache.c+62 -850 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/4] sunrpc: cache infrastructure scalability improvements

The first patch fixes a pre-existing bug that Neil spotted during the review of v1. The next two patches convert the global spinlock and waitqueue to be per-cache_detail instead.

The last patch splits up the cache_detail->queue into two lists: one to hold cache_readers and one for cache_requests. This simplifies the code, and the new sequence number that helps the readers track position may help with implementing netlink upcalls.

Please consider these for v7.1.

---
Changes in v2:
- Don't spinlock around rp->next_seqno updates
- Fix potential cache_request leak in cache_release()
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Jeff Layton (4):
sunrpc: fix cache_request leak in cache_release
sunrpc: convert queue_lock from global spinlock to per-cache-detail lock
sunrpc: convert queue_wait from global to per-cache-detail waitqueue
sunrpc: split cache_detail queue into request and reader lists

 include/linux/sunrpc/cache.h |   7 +-
 net/sunrpc/cache.c           | 189 ++++++++++++++++++++-----------------------
 2 files changed, 95 insertions(+), 101 deletions(-)

---
base-commit: 8fd7d969255c89fb28cd9f34e0d729150da79d68
change-id: 20260220-sunrpc-cache-fe4cd44413d3

Best regards,

Signature · 1 line
Jeff Layton <[email protected]>