From: "Paul E. McKenney" <paulmck@kernel.org>
To: Chris Mason <clm@fb.com>
Cc: Giuseppe Scrivano <gscrivan@redhat.com>,
"riel@surriel.com" <riel@surriel.com>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
Kernel Team <Kernel-team@fb.com>
Subject: Re: [PATCH RFC fs/namespace] Make kern_unmount() use synchronize_rcu_expedited()
Date: Mon, 14 Feb 2022 11:44:40 -0800 [thread overview]
Message-ID: <20220214194440.GZ4285@paulmck-ThinkPad-P17-Gen-1> (raw)
In-Reply-To: <C88FC9A7-D6AD-4382-B74A-175922F57852@fb.com>
On Mon, Feb 14, 2022 at 07:26:49PM +0000, Chris Mason wrote:
>
>
> > On Feb 14, 2022, at 2:05 PM, Paul E. McKenney <paulmck@kernel.org> wrote:
> >
> > Experimental. Not for inclusion. Yet, anyway.
> >
> > Freeing large numbers of namespaces in quick succession can result in
> > a bottleneck on the synchronize_rcu() invoked from kern_unmount().
> > This patch applies the synchronize_rcu_expedited() hammer to allow
> > further testing and fault isolation.
> >
> > Hey, at least there was no need to change the comment! ;-)
> >
>
> I don’t think this will be fast enough. I think the problem is that commit e1eb26fa62d04ec0955432be1aa8722a97cb52e7 is putting all of the ipc namespace frees onto a list, and every free includes one call to synchronize_rcu()
>
> The end result is that we can create new namespaces much much faster than we can free them, and eventually we run out. I found this while debugging clone() returning ENOSPC because create_ipc_ns() was returning ENOSPC.
Moving from synchronize_rcu() to synchronize_rcu_expedited() does buy
you at least an order of magnitude. But yes, it should be possible to
get rid of all but one call per batch, which would be better. Maybe
a bit more complicated, but probably not that much.
Let me see what I can come up with.
If this is an emergency, I still suggest trying the patch as a short-term
workaround.
Thanx, Paul
next prev parent reply other threads:[~2022-02-14 20:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 19:05 Paul E. McKenney
2022-02-14 19:26 ` Chris Mason
2022-02-14 19:44 ` Paul E. McKenney [this message]
2022-02-14 20:55 ` Rik van Riel
2022-02-14 21:41 ` Paul E. McKenney
2022-02-15 18:28 ` Chris Mason
2022-04-26 6:59 ` Christoph Bartoschek
2022-04-26 14:09 ` Paul E. McKenney
2022-04-26 22:58 ` Christoph Bartoschek
2022-04-26 23:11 ` Paul E. McKenney
2022-04-27 12:19 ` Chris Mason
2022-04-27 15:01 ` Paul E. McKenney
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=20220214194440.GZ4285@paulmck-ThinkPad-P17-Gen-1 \
--to=paulmck@kernel.org \
--cc=Kernel-team@fb.com \
--cc=clm@fb.com \
--cc=gscrivan@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@surriel.com \
--cc=viro@zeniv.linux.org.uk \
/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®