mirror of https://lore.kernel.org/lkml/
 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>,
	Shuah Khan <shuah@kernel.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-kselftest@vger.kernel.org,
	Jeff Layton <jlayton@kernel.org>
Subject: [PATCH 0/8] nfsd: reduce the scope of the nfsd_mutex
Date: Mon, 21 Sep 2026 12:31:39 -0400	[thread overview]
Message-ID: <20260921-nfsd-per-net-mutex-v1-0-4a7287f6504c@kernel.org> (raw)

Currently much of nfsd's administration is serialized under the global
nfsd_mutex, even though most of the objects managed under it are
segregated by net namespace.

This patchset does a couple of small cleanups and then adds a new
per-net mutex and moves all of the appropriate per-net data structures
to be protected by it instead of the global mutex. The filecache is
given its own mutex, and the global mutex is renamed and left for
managing just the few remaning global objects.

I also had an LLM cook up some selftests so we can hopefully keep all of
this working properly in the future.

Please consider for v7.4.

Thanks,
Jeff

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Jeff Layton (8):
      nfsd: clear NFSD_NET_UP before dropping the generic resource reference
      nfsd: make max_blksize a per-namespace setting
      nfsd: move the control plane to a per-namespace mutex
      nfsd: rename nfsd_mutex to nfsd_global_mutex
      nfsd: give the open file cache its own mutex
      selftests/nfsd: factor the netlink plumbing into a shared header
      selftests/nfsd: add cross-namespace isolation tests
      selftests/nfsd: add a cross-namespace control-plane soak

 fs/nfsd/export.c                                   |  22 +-
 fs/nfsd/filecache.c                                |  36 +-
 fs/nfsd/netns.h                                    |  16 +
 fs/nfsd/nfs4proc.c                                 |   4 +-
 fs/nfsd/nfs4state.c                                |   8 +-
 fs/nfsd/nfsctl.c                                   | 129 ++---
 fs/nfsd/nfsd.h                                     |   4 +-
 fs/nfsd/nfssvc.c                                   | 146 ++++--
 tools/testing/selftests/nfsd/Makefile              |   2 +
 tools/testing/selftests/nfsd/config                |   6 +
 tools/testing/selftests/nfsd/nfsd_netlink.h        | 319 ++++++++++++
 .../testing/selftests/nfsd/nfsd_netlink_listener.c | 301 +----------
 tools/testing/selftests/nfsd/nfsd_netns_isolation  | Bin 0 -> 49192 bytes
 .../testing/selftests/nfsd/nfsd_netns_isolation.c  | 450 ++++++++++++++++
 tools/testing/selftests/nfsd/nfsd_netns_stress     | Bin 0 -> 39232 bytes
 tools/testing/selftests/nfsd/nfsd_netns_stress.c   | 572 +++++++++++++++++++++
 tools/testing/selftests/nfsd/settings              |   2 +-
 17 files changed, 1580 insertions(+), 437 deletions(-)
---
base-commit: aeaddc6a3711283c09a9183068897d4fe1fb464f
change-id: 20260918-nfsd-per-net-mutex-8655764940ac

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


             reply	other threads:[~2026-09-21 16:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 16:31 Jeff Layton [this message]
2026-09-21 16:31 ` [PATCH 1/8] nfsd: clear NFSD_NET_UP before dropping the generic resource reference Jeff Layton
2026-09-21 16:31 ` [PATCH 2/8] nfsd: make max_blksize a per-namespace setting Jeff Layton
2026-09-21 16:31 ` [PATCH 3/8] nfsd: move the control plane to a per-namespace mutex Jeff Layton
2026-09-21 16:31 ` [PATCH 4/8] nfsd: rename nfsd_mutex to nfsd_global_mutex Jeff Layton
2026-09-21 16:31 ` [PATCH 5/8] nfsd: give the open file cache its own mutex Jeff Layton
2026-09-22  6:37   ` NeilBrown
2026-09-22 10:18     ` Jeff Layton
2026-09-21 16:31 ` [PATCH 6/8] selftests/nfsd: factor the netlink plumbing into a shared header Jeff Layton
2026-09-21 16:31 ` [PATCH 7/8] selftests/nfsd: add cross-namespace isolation tests Jeff Layton
2026-09-21 16:31 ` [PATCH 8/8] selftests/nfsd: add a cross-namespace control-plane soak Jeff Layton
2026-09-21 18:20   ` Chuck Lever
2026-09-21 19:09     ` Jeff Layton
2026-09-22  6:39 ` [PATCH 0/8] nfsd: reduce the scope of the nfsd_mutex NeilBrown

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=20260921-nfsd-per-net-mutex-v1-0-4a7287f6504c@kernel.org \
    --to=jlayton@kernel.org \
    --cc=Dai.Ngo@oracle.com \
    --cc=cel@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neil@brown.name \
    --cc=okorniev@redhat.com \
    --cc=shuah@kernel.org \
    --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

all inboxes | Powered by JetHome®