All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <cel@kernel.org>, NeilBrown <neil@brown.name>,
	Olga Kornievskaia <okorniev@redhat.com>,
	Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH v3 0/8] NFSD: CB_RECALL_ANY fixes and a meaningful keep count
Date: Fri, 14 Aug 2026 07:03:36 -0400	[thread overview]
Message-ID: <36409b40bd92bbdc8f85661f58afaeac3fb3eeef.camel@kernel.org> (raw)
In-Reply-To: <20260813-recall-any-keep-count-v3-0-a96d243c0b13@kernel.org>

On Thu, 2026-08-13 at 14:40 -0400, Chuck Lever wrote:
> NFSD currently sends every CB_RECALL_ANY with craa_objects_to_keep
> set to zero, as RFC 8881 Section 20.6.3 does not mandate any
> particular way for a client to choose which delegations to return,
> if any.
> 
> NFSD intends CB_RECALL_ANY only as a signal to return currently
> unused delegations. To date, only the Linux NFS client has been
> deeply tested against it. That implementation ignores the
> craa_objects_to_keep value and returns only one unused delegation
> of the named types. Therefore the fixed zero craa_objects_to_keep
> value never produced visible misbehavior during our testing.
> 
> However, a zero value can result in non-Linux clients giving back
> more delegations than is necessary to relieve temporary memory
> pressure on the server, which needlessly punctures the clients'
> delegation working set.
> 
> Change NFSD so that each CB_RECALL_ANY asks a client to give up a
> sensible number of delegations instead of all of them at once. To
> handle the accounting correctly, it is necessary for this series to
> split the current state shrinker mechanism. The patch descriptions
> have those details.
> 
> ---
> Changes in v3:
> - Count delegations per namespace so each shrinker reports its own.
> - Give courtesy clients and delegations separate state shrinkers.
> - Record the shrinker's scan requests and discount the count by them.
> - Scale each client's CB_RECALL_ANY by its share of the scan request.
> - Reword the keep-count rationale in the commit message and comment.
> - Link to v2: https://patch.msgid.link/20260812-recall-any-keep-count-v2-0-a82f4ca23812@kernel.org
> 
> Changes in v2:
> - Drop the gate that skipped clients holding a single delegation.
> - Cover letter rewritten to give performance rationale.
> - Link to v1: https://patch.msgid.link/20260811-recall-any-keep-count-v1-0-de9ca00493b7@kernel.org
> 
> ---
> Chuck Lever (8):
>       NFSD: Do not send CB_RECALL_ANY to NFSv4.0 clients
>       NFSD: Count the delegations held by each client
>       NFSD: Name directory delegations in the CB_RECALL_ANY type mask
>       NFSD: Send a meaningful CB_RECALL_ANY keep count
>       NFSD: Count delegations per network namespace
>       NFSD: Give delegations their own state shrinker
>       NFSD: Pace the state shrinker's scan requests
>       NFSD: Apportion CB_RECALL_ANY recalls among clients
> 
>  fs/nfsd/netns.h     |  17 +++-
>  fs/nfsd/nfs4state.c | 235 +++++++++++++++++++++++++++++++++++++++++++++-------
>  fs/nfsd/state.h     |   2 +
>  3 files changed, 223 insertions(+), 31 deletions(-)
> ---
> base-commit: 1d479c6b53f684b27da84ec352b7efb97f7f115f
> change-id: 20260810-recall-any-keep-count-f50c2ae1b792
> 
> Best regards,
> --  
> Chuck Lever <cel@kernel.org>

You can add this to 5-8:

Reviewed-by: Jeff Layton <jlayton@kernel.org>

      parent reply	other threads:[~2026-08-14 11:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-13 18:40 [PATCH v3 0/8] NFSD: CB_RECALL_ANY fixes and a meaningful keep count Chuck Lever
2026-08-13 18:40 ` [PATCH v3 1/8] NFSD: Do not send CB_RECALL_ANY to NFSv4.0 clients Chuck Lever
2026-08-13 18:40 ` [PATCH v3 2/8] NFSD: Count the delegations held by each client Chuck Lever
2026-08-13 18:40 ` [PATCH v3 3/8] NFSD: Name directory delegations in the CB_RECALL_ANY type mask Chuck Lever
2026-08-13 18:40 ` [PATCH v3 4/8] NFSD: Send a meaningful CB_RECALL_ANY keep count Chuck Lever
2026-08-13 18:40 ` [PATCH v3 5/8] NFSD: Count delegations per network namespace Chuck Lever
2026-08-13 18:40 ` [PATCH v3 6/8] NFSD: Give delegations their own state shrinker Chuck Lever
2026-08-13 18:40 ` [PATCH v3 7/8] NFSD: Pace the state shrinker's scan requests Chuck Lever
2026-08-13 18:40 ` [PATCH v3 8/8] NFSD: Apportion CB_RECALL_ANY recalls among clients Chuck Lever
2026-08-14 11:03 ` Jeff Layton [this message]

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=36409b40bd92bbdc8f85661f58afaeac3fb3eeef.camel@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=cel@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.