From: Al Viro <viro@zeniv.linux.org.uk>
To: "Miroslav Crnić" <mcrnic@gmail.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: shrink_dcache_parent contention can make it stall for hours
Date: Thu, 2 Oct 2025 13:35:05 +0100 [thread overview]
Message-ID: <20251002123505.GM39973@ZenIV> (raw)
In-Reply-To: <CAD8Qqac-3Oss=M4aU0B_gKCzBhuUo0ChH+8wFkWDPz=mQVqSiQ@mail.gmail.com>
On Thu, Oct 02, 2025 at 12:54:38PM +0100, Miroslav Crnić wrote:
> Option 1:
> Don't differentiate between work stealing and own work.
> Collect items for work stealing in the disposal list along with regular items.
> Fight out the contention per item with try_lock and continue through the list.
Currently disposal list is modified only by the thread that has created it;
which lock (if any) do you have in mind for protecting those?
> Option 2:
> Change shrink_dcache_parent to collect a dispose list for one unique parent.
> Split out unlinking from parent from __dentry_kill.
> Run over the disposal list in 2 passes.
> First pass does everything except unlink parent.
> Second pass does all unlinking under a single parent->d_lock grab.
Do you mean dentry_unlist()? The problem is, how do you prevent those parents
looking inexplicably busy? Cross-fs disposal list existing in parallel with fs
shutdown is very much possible; shrink_dcache_for_umount() should quietly steal
everything relevant from that and move on, leaving the empty husks on the
list to by freed by list owner once it gets to them.
next prev parent reply other threads:[~2025-10-02 12:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-02 11:54 shrink_dcache_parent contention can make it stall for hours Miroslav Crnić
2025-10-02 12:35 ` Al Viro [this message]
2025-10-02 12:54 ` Miroslav Crnić
2025-10-02 20:43 ` Miroslav Crnić
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=20251002123505.GM39973@ZenIV \
--to=viro@zeniv.linux.org.uk \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mcrnic@gmail.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 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.