From: Al Viro <viro@zeniv.linux.org.uk>
To: Rik van Riel <riel@surriel.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com,
linux-fsdevel@vger.kernel.org, paulmck@kernel.org,
gscrivan@redhat.com, Eric Biederman <ebiederm@xmission.com>,
Chris Mason <clm@fb.com>
Subject: Re: [PATCH 1/2] vfs: free vfsmount through rcu work from kern_unmount
Date: Sat, 19 Feb 2022 06:07:47 +0000 [thread overview]
Message-ID: <YhCJM3oFbjlln77a@zeniv-ca.linux.org.uk> (raw)
In-Reply-To: <YhCG9cdw2JZSKbDZ@zeniv-ca.linux.org.uk>
On Sat, Feb 19, 2022 at 05:58:13AM +0000, Al Viro wrote:
> On Sat, Feb 19, 2022 at 05:53:37AM +0000, Al Viro wrote:
> > On Fri, Feb 18, 2022 at 01:31:13PM -0500, Rik van Riel wrote:
> >
> > > struct super_block;
> > > struct vfsmount;
> > > @@ -73,6 +74,7 @@ struct vfsmount {
> > > struct super_block *mnt_sb; /* pointer to superblock */
> > > int mnt_flags;
> > > struct user_namespace *mnt_userns;
> > > + struct rcu_work free_rwork;
> > > } __randomize_layout;
> >
> > Wait, what? First of all, that has no business being in vfsmount -
> > everything that deeply internal belongs in struct mount, not in
> > its public part. Moreover, there's already mount->mnt_rcu, so what's
> > the point duplicating that?
>
> Argh... You need rcu_work there...
>
> OK, so make that a member of the same union mnt_rcu is. In struct mount,
> please. And I'm not sure I like the idea of shoving that much into
> struct mount, TBH...
We might have a plenty of struct mount instances. Very few of them will
ever be internal, in the first place. Fewer yet - using kern_unmount_rcu().
And it's not small. If anything, I would consider something like
call_rcu(&m->mnt_rcu, callback)
with callback adding struct mount to llist and doing schedule_delayed_work()
on that. With work consisting of doing mntput on everything in it.
I'll get some sleep and put together something along those lines tomorrow
morning.
next prev parent reply other threads:[~2022-02-19 6:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-18 18:31 [PATCH 0/2] fix rate limited ipc_namespace freeing Rik van Riel
2022-02-18 18:31 ` [PATCH 1/2] vfs: free vfsmount through rcu work from kern_unmount Rik van Riel
2022-02-18 19:26 ` Al Viro
2022-02-18 19:33 ` Rik van Riel
2022-02-18 19:43 ` Al Viro
2022-02-18 20:24 ` Al Viro
2022-02-18 21:06 ` Al Viro
2022-02-19 5:50 ` Al Viro
2022-02-19 5:53 ` Al Viro
2022-02-19 5:58 ` Al Viro
2022-02-19 6:07 ` Al Viro [this message]
2022-02-18 18:31 ` [PATCH 2/2] ipc: get rid of free_ipc_work workqueue Rik van Riel
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=YhCJM3oFbjlln77a@zeniv-ca.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=clm@fb.com \
--cc=ebiederm@xmission.com \
--cc=gscrivan@redhat.com \
--cc=kernel-team@fb.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=riel@surriel.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