[PATCH 0/3] sunrpc: cache infrastructure scalability improvements

Jeff Layton posted 3 patches 1 month, 1 week ago
There is a newer version of this series
include/linux/sunrpc/cache.h |   7 +-
net/sunrpc/cache.c           | 179 +++++++++++++++++++------------------------
2 files changed, 85 insertions(+), 101 deletions(-)
[PATCH 0/3] sunrpc: cache infrastructure scalability improvements
Posted by Jeff Layton 1 month, 1 week ago
I've been working on trying to retrofit a netlink upcall into the sunrpc
cache infrastructure. While crawling over that code, I noticed that it
relies on both a global spinlock and waitqueue. The first two patches
convert those 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.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (3):
      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           | 179 +++++++++++++++++++------------------------
 2 files changed, 85 insertions(+), 101 deletions(-)
---
base-commit: cca65706e7b428b96c951016fc372cc766b94b71
change-id: 20260220-sunrpc-cache-fe4cd44413d3

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>
Re: [PATCH 0/3] sunrpc: cache infrastructure scalability improvements
Posted by Chuck Lever 1 month, 1 week ago
From: Chuck Lever <chuck.lever@oracle.com>

On Fri, 20 Feb 2026 07:26:02 -0500, Jeff Layton wrote:
> I've been working on trying to retrofit a netlink upcall into the sunrpc
> cache infrastructure. While crawling over that code, I noticed that it
> relies on both a global spinlock and waitqueue. The first two patches
> convert those 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.
> 
> [...]

Applied to nfsd-testing, thanks!

[1/3] sunrpc: convert queue_lock from global spinlock to per-cache_detail lock
      commit: 8da8f32e9a2702259cdf97e2f8f492ef9c79db65
[2/3] sunrpc: convert queue_wait from global to per-cache_detail waitqueue
      commit: 802261d8b58dd2f41a52a0c92776e0fb45619efe
[3/3] sunrpc: split cache_detail queue into request and reader lists
      commit: 0eb3d9dc71ada02909e4dfe9cb54e703ec717ed4

--
Chuck Lever