From: Waiman Long <longman@redhat.com>
To: Yafang Shao <laoar.shao@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
linux-fsdevel@vger.kernel.org, Wangkai <wangkai86@huawei.com>,
Colin Walters <walters@verbum.org>
Subject: Re: [RFC PATCH] fs: dcache: Delete the associated dentry when deleting a file
Date: Sat, 11 May 2024 00:54:18 -0400 [thread overview]
Message-ID: <bed71a80-b701-4d04-bf30-84f189c41b2c@redhat.com> (raw)
In-Reply-To: <CALOAHbCECWqpFzreANpvQJADicRr=AbP-nAymSEeUzUr3vGZMg@mail.gmail.com>
On 5/10/24 23:35, Yafang Shao wrote:
>> pointless (because the dentry won't be reused, so DCACHE_CANT_MOUNT
>> just won't matter).
>>
>> I do worry that there are loads that actually love our current
>> behavior, but maybe it's worth doing the simple unconditional "make
>> d_delete() always unhash" and only worry about whether that causes
>> performance problems for people who commonly create a new file in its
>> place when we get such a report.
>>
>> IOW, the more complex thing might be to actually take other behavior
>> into account (eg "do we have so many negative dentries that we really
>> don't want to create new ones").
> This poses a substantial challenge. Despite recurrent discussions
> within the community about improving negative dentry over and over,
> there hasn't been a consensus on how to address it.
I had suggested in the past to have a sysctl parameter to set a
threshold on how many negative dentries (as a percentage of total system
memory) are regarded as too many and activate some processes to control
dentry creation. The hard part is to discard the oldest negative
dentries as we can have many memcg LRU lists to look at and it can be a
time consuming process. We could theoretically start removing dentries
when removing files when 50% of the threshold is reached. At 100%, we
start discarding old negative dentries. At 150%, we stop negative dentry
creation altogether.
My 2 cents.
Cheers,
Longman
next prev parent reply other threads:[~2024-05-11 4:54 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 [this message]
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
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=bed71a80-b701-4d04-bf30-84f189c41b2c@redhat.com \
--to=longman@redhat.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=laoar.shao@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
--cc=walters@verbum.org \
--cc=wangkai86@huawei.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;
as well as URLs for NNTP newsgroup(s).