From: Jeff Layton <jlayton@kernel.org>
To: Chuck Lever <chuck.lever@oracle.com>, NeilBrown <neil@brown.name>
Cc: linux-nfs@vger.kernel.org,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>,
Li Lingfeng <lilingfeng3@huawei.com>
Subject: Re: [PATCH 0/3 RFC] improve some nfsd_mutex locking
Date: Sat, 21 Jun 2025 13:48:19 -0400 [thread overview]
Message-ID: <5b529e14604ec98146aab0dc47c54d07c1a34359.camel@kernel.org> (raw)
In-Reply-To: <b8f44a6a-6e35-4d59-bfbc-fac0454f7c22@oracle.com>
On Sat, 2025-06-21 at 11:21 -0400, Chuck Lever wrote:
> On 6/20/25 7:33 PM, NeilBrown wrote:
> > The first patch hopefully fixes a bug with locking as reported by Li
> > Lingfeng: some write_foo functions aren't locked properly.
> >
> > The other two improve the locking code, particulary so that we don't
> > need a global mutex to change per-netns data.
> >
> > I've revised the locking to use guard(mutex) for (almost) all places
> > that the per-netfs mutex is used. I think this is an improvement but
> > would like to know what others think.
> >
> > I haven't changed _get/_put to _pin/_unpin as Chuck wondered about. I'm
> > not against that (though get/put are widely understood) but nor am I
> > particularly for it yet. Again, opinions are welcome.
>
> I think of get and put as operations you do on an object. Saying
>
> nfsd_startup_get();
>
> seems a little strange to me. As I said before, it seems like you
> are protecting a critical section, not a particular object.
>
I think of it as taking a reference to the service being up and
running. Maybe nfsd_service_get/put() ?
--
Jeff Layton <jlayton@kernel.org>
next prev parent reply other threads:[~2025-06-21 17:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 23:33 [PATCH 0/3 RFC] improve some nfsd_mutex locking NeilBrown
2025-06-20 23:33 ` [PATCH 1/3] nfsd: provide proper locking for all write_ function NeilBrown
2025-06-21 8:50 ` Li Lingfeng
2025-06-20 23:33 ` [PATCH 2/3] nfsd: use kref and new mutex for global config management NeilBrown
2025-06-20 23:33 ` [PATCH 3/3] nfsd: split nfsd_mutex into one mutex per net-namespace NeilBrown
2025-06-21 13:02 ` kernel test robot
2025-06-21 15:21 ` [PATCH 0/3 RFC] improve some nfsd_mutex locking Chuck Lever
2025-06-21 17:48 ` Jeff Layton [this message]
2025-06-23 2:47 ` NeilBrown
-- strict thread matches above, loose matches on Subject: below --
2025-06-18 21:31 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=5b529e14604ec98146aab0dc47c54d07c1a34359.camel@kernel.org \
--to=jlayton@kernel.org \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=lilingfeng3@huawei.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox