From: Al Viro <viro@zeniv.linux.org.uk>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
brauner@kernel.org, jack@suse.cz, laoar.shao@gmail.com,
linux-fsdevel@vger.kernel.org, longman@redhat.com,
walters@verbum.org, wangkai86@huawei.com, willy@infradead.org
Subject: Re: [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()'
Date: Sun, 12 May 2024 17:16:40 +0100 [thread overview]
Message-ID: <20240512161640.GI2118490@ZenIV> (raw)
In-Reply-To: <a4320c051be326ddeaeba44c4d209ccf7c2a3502.camel@HansenPartnership.com>
On Sun, May 12, 2024 at 11:45:44AM -0400, James Bottomley wrote:
> On Sat, 2024-05-11 at 20:28 +0100, Al Viro wrote:
> > On Sat, May 11, 2024 at 11:42:34AM -0700, Linus Torvalds wrote:
> >
> > > so we have another level of locking going on, and my patch only
> > > moved
> > > the dcache pruning outside the lock of the directory we're removing
> > > (not outside the lock of the directory that contains the removed
> > > directory).
> > >
> > > And that outside lock is the much more important one, I bet.
> >
> > ... and _that_ is where taking d_delete outside of the lock might
> > take an unpleasant analysis of a lot of code.
>
> Couldn't you obviate this by doing it from a workqueue? Even if the
> directory is recreated, the chances are most of the negative dentries
> that were under it will still exist and be removable by the time the
> workqueue runs.
Eviction in general - sure
shrink_dcache_parent() in particular... not really - you'd need to keep
dentry pinned for that and that'd cause all kinds of fun for umount
d_delete() - even worse (you don't want dcache lookups to find that
sucker after rmdir(2) returned success to userland).
next prev parent reply other threads:[~2024-05-12 16:16 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-11 2:27 [RFC PATCH] fs: dcache: Delete the associated dentry when deleting a file Yafang Shao
2024-05-11 2:53 ` Linus Torvalds
2024-05-11 3:35 ` Yafang Shao
2024-05-11 4:54 ` Waiman Long
2024-05-11 15:58 ` Matthew Wilcox
2024-05-11 16:07 ` Linus Torvalds
2024-05-11 16:13 ` Linus Torvalds
2024-05-11 18:05 ` Linus Torvalds
2024-05-11 18:26 ` [PATCH] vfs: move dentry shrinking outside the inode lock in 'rmdir()' Linus Torvalds
2024-05-11 18:42 ` Linus Torvalds
2024-05-11 19:28 ` Al Viro
2024-05-11 19:55 ` Linus Torvalds
2024-05-11 20:31 ` Al Viro
2024-05-11 21:17 ` Al Viro
2024-05-12 15:45 ` James Bottomley
2024-05-12 16:16 ` Al Viro [this message]
2024-05-12 19:59 ` Linus Torvalds
2024-05-12 20:29 ` Linus Torvalds
2024-05-13 5:31 ` Al Viro
2024-05-13 15:58 ` Linus Torvalds
2024-05-13 16:33 ` Al Viro
2024-05-13 16:44 ` Linus Torvalds
2024-05-23 7:18 ` Dave Chinner
2024-05-11 20:02 ` [PATCH v2] " Linus Torvalds
2024-05-12 3:06 ` Yafang Shao
2024-05-12 3:30 ` Al Viro
2024-05-12 3:36 ` Yafang Shao
2024-05-11 19:24 ` [PATCH] " Al Viro
2024-05-15 2:18 ` [RFC PATCH] fs: dcache: Delete the associated dentry when deleting a file Yafang Shao
2024-05-15 2:36 ` Linus Torvalds
2024-05-15 9:17 ` [PATCH] vfs: " Yafang Shao
2024-05-15 16:05 ` Linus Torvalds
2024-05-16 13:44 ` Oliver Sang
2024-05-22 8:51 ` Oliver Sang
2024-05-23 2:21 ` Yafang Shao
2024-05-22 8:11 ` kernel test robot
2024-05-22 16:00 ` Linus Torvalds
2024-05-22 17:13 ` Matthew Wilcox
2024-05-22 18:11 ` Linus Torvalds
2024-05-11 3:36 ` [RFC PATCH] fs: dcache: " Al Viro
2024-05-11 3:51 ` Yafang Shao
2024-05-11 5:18 ` Al Viro
2024-05-11 5:32 ` Linus Torvalds
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=20240512161640.GI2118490@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=James.Bottomley@hansenpartnership.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=laoar.shao@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=longman@redhat.com \
--cc=torvalds@linux-foundation.org \
--cc=walters@verbum.org \
--cc=wangkai86@huawei.com \
--cc=willy@infradead.org \
/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.