From: Chuck Lever <cel@kernel.org>
To: Jeff Layton <jlayton@kernel.org>, NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: Rick Macklem <rmacklem@uoguelph.ca>,
linux-nfs@vger.kernel.org, Chuck Lever <cel@kernel.org>
Subject: [PATCH 0/7] Implied-ACK eviction for NFSD's duplicate reply cache
Date: Wed, 26 Aug 2026 16:26:50 -0400 [thread overview]
Message-ID: <20260826-duplicate-reply-cache-v1-0-b1d51e1af5c7@kernel.org> (raw)
Connection-oriented transports (TCP, RDMA) guarantee in-order
delivery: arrival of a new request proves every prior reply on that
connection has been received. This series exploits that property to
evict completed DRC entries as soon as the next request arrives on
the same transport, rather than waiting out the 120-second
RC_EXPIRE timeout.
Each DRC entry records its originating transport. A new
xpt_last_recv timestamp on svc_xprt marks when the most recent
request arrived. During bucket pruning, nfsd_prune_bucket_locked()
compares the entry's timestamp against xpt_last_recv; a newer
value on the same transport means the reply was delivered, and the
entry is evicted immediately.
Profiled with "perf record -e cycles -e cpu-clock -e LLC-load-misses
-e branch-misses" during an NFSv3/RDMA 4KB random-write workload.
nfsd_cache_lookup overhead dropped from 1.53% to 0.76% of CPU
cycles. The rb-tree operations (rb_erase, rb_insert_color) that
dominated LLC cache misses fell from a combined 13.2% to 1.1% of all
LLC-load-misses, because shorter-lived entries keep the per-bucket
trees small.
---
Chuck Lever (7):
SUNRPC: Assign a unique identifier to each svc_xprt
NFSD: Track transport in DRC entries
SUNRPC: Record last-request timestamp on svc_xprt
SUNRPC: Mark connection-oriented transports on svc_xprt
NFSD: Evict completed DRC entries via implied ACK
NFSD: Add tracepoints for DRC entry eviction
NFSD: Record DRC population in lookup tracepoints
fs/nfsd/cache.h | 1 +
fs/nfsd/nfscache.c | 88 +++++++++++++++++++++++++++-----
fs/nfsd/trace.h | 49 ++++++++++++++++--
include/linux/sunrpc/svc_xprt.h | 5 +-
include/trace/events/sunrpc.h | 9 +++-
net/sunrpc/netns.h | 4 ++
net/sunrpc/sunrpc_syms.c | 3 ++
net/sunrpc/svc_xprt.c | 54 ++++++++++++++++++--
net/sunrpc/svcsock.c | 41 ++++++++++-----
net/sunrpc/xprtrdma/svc_rdma_transport.c | 6 ++-
10 files changed, 222 insertions(+), 38 deletions(-)
---
base-commit: 3a4d7c7c9466a07fa4176ce35180149709d92c22
change-id: 20260325-duplicate-reply-cache-f0fe7c7b740c
Best regards,
--
Chuck Lever <cel@kernel.org>
next reply other threads:[~2026-08-26 20:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-26 20:26 Chuck Lever [this message]
2026-08-26 20:26 ` [PATCH 1/7] SUNRPC: Assign a unique identifier to each svc_xprt Chuck Lever
2026-08-26 20:26 ` [PATCH 2/7] NFSD: Track transport in DRC entries Chuck Lever
2026-08-26 20:26 ` [PATCH 3/7] SUNRPC: Record last-request timestamp on svc_xprt Chuck Lever
2026-08-26 20:26 ` [PATCH 4/7] SUNRPC: Mark connection-oriented transports " Chuck Lever
2026-08-26 20:26 ` [PATCH 5/7] NFSD: Evict completed DRC entries via implied ACK Chuck Lever
2026-08-26 20:26 ` [PATCH 6/7] NFSD: Add tracepoints for DRC entry eviction Chuck Lever
2026-08-26 20:26 ` [PATCH 7/7] NFSD: Record DRC population in lookup tracepoints Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260826-duplicate-reply-cache-v1-0-b1d51e1af5c7@kernel.org \
--to=cel@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=jlayton@kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=rmacklem@uoguelph.ca \
--cc=tom@talpey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox