Linux-NFS Archive mirror
 help / color / mirror / Atom feed
From: Lei Lei2 Yin <yinlei2@lenovo.com>
To: Trond Myklebust <trondmy@kernel.org>, Anna Schumaker <anna@kernel.org>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH 0/1] NFS: pnfs: cache data server entries for a short grace period
Date: Thu, 16 Apr 2026 07:18:16 +0000	[thread overview]
Message-ID: <PUZPR03MB5990BECB40673CC6A22C021388232@PUZPR03MB5990.apcprd03.prod.outlook.com> (raw)

Hi,

This patch keeps pNFS data server cache entries alive for a short grace
period after the last reference is dropped.

Today, a data server cache entry is destroyed immediately when the last
reference goes away. In open/close-heavy workloads, that can lead to
repeated teardown and re-creation of the same data server cache entry
when the same data server is reused again shortly afterwards.

This patch defers destruction for a short time and reuses the existing
entry if the same data server is looked up again before the timeout
expires. Since destruction is deferred, it also reaps scheduled destroy
work during netns teardown.

In testing with workloads that repeatedly open and close files, the
additional read/write latency associated with repeated data server cache
churn dropped from a few milliseconds, and in some runs tens of
milliseconds, to under 100 microseconds.

Thanks,
Lei Yin

Lei Yin (1):
  NFS: pnfs: cache data server entries for a short grace period

                 reply	other threads:[~2026-04-16  7:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=PUZPR03MB5990BECB40673CC6A22C021388232@PUZPR03MB5990.apcprd03.prod.outlook.com \
    --to=yinlei2@lenovo.com \
    --cc=anna@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trondmy@kernel.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).