linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Qi Zheng <qi.zheng@linux.dev>
To: "yebin (H)" <yebin10@huawei.com>,
	Muchun Song <muchun.song@linux.dev>,
	Ye Bin <yebin@huaweicloud.com>
Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
	linux-fsdevel@vger.kernel.org, akpm@linux-foundation.org,
	david@fromorbit.com, roman.gushchin@linux.dev,
	linux-mm@kvack.org
Subject: Re: [PATCH v3 0/3] add support for drop_caches for individual filesystem
Date: Fri, 27 Feb 2026 14:50:17 +0800	[thread overview]
Message-ID: <e4834869-4144-41aa-b370-9c4e6091322e@linux.dev> (raw)
In-Reply-To: <69A13C1A.9020002@huawei.com>



On 2/27/26 2:39 PM, yebin (H) wrote:
> 
> 
> On 2026/2/27 11:31, Muchun Song wrote:
>>
>>
>>> On Feb 27, 2026, at 10:55, Ye Bin <yebin@huaweicloud.com> wrote:
>>>
>>> From: Ye Bin <yebin10@huawei.com>
>>>
>>> In order to better analyze the issue of file system uninstallation 
>>> caused
>>> by kernel module opening files, it is necessary to perform dentry 
>>> recycling
>>> on a single file system. But now, apart from global dentry recycling, 
>>> it is
>>> not supported to do dentry recycling on a single file system separately.
>>
>> Would shrinker-debugfs satisfy your needs (See Documentation/admin- 
>> guide/mm/shrinker_debugfs.rst)?
>>
>> Thanks,
>> Muchun
>>
> Thank you for the reminder. The reclamation of dentries and nodes can 
> meet my needs. However, the reclamation of the page cache alone does not 
> satisfy my requirements. I have reviewed the code of 
> shrinker_debugfs_scan_write() and found that it does not support batch 
> deletion of all dentries/inode for all nodes/memcgs,instead, users need 
> to traverse through them one by one, which is not very convenient. Based 
> on my previous experience, I have always performed dentry/inode 
> reclamation at the file system level.

Using shrinker-debugfs allows users to specify the size of a single
reclaim cycle (nr_to_scan), which controls the strength of each reclaim
cycle to adapt to different workloads. Can the new drop_fs_caches
support a similar approach?

Thanks,
Qi

> 
> Thanks,
> Ye Bin
>>> This feature has usage scenarios in problem localization scenarios.At 
>>> the
>>> same time, it also provides users with a slightly fine-grained
>>> pagecache/entry recycling mechanism.
>>> This patchset supports the recycling of pagecache/entry for 
>>> individual file
>>> systems.
>>>
>>> Diff v3 vs v2
>>> 1. Introduce introduce drop_sb_dentry_inode() helper instead of
>>> reclaim_dcache_sb()/reclaim_icache_sb() helper for reclaim dentry/inode.
>>> 2. Fixing compilation issues in specific architectures and 
>>> configurations.
>>>
>>> Diff v2 vs v1:
>>> 1. Fix possible live lock for shrink_icache_sb().
>>> 2. Introduce reclaim_dcache_sb() for reclaim dentry.
>>> 3. Fix potential deadlocks as follows:
>>> https://lore.kernel.org/linux- 
>>> fsdevel/00000000000098f75506153551a1@google.com/
>>> After some consideration, it was decided that this feature would 
>>> primarily
>>> be used for debugging purposes. Instead of adding a new IOCTL 
>>> command, the
>>> task_work mechanism was employed to address potential deadlock issues.
>>>
>>> Ye Bin (3):
>>>   mm/vmscan: introduce drop_sb_dentry_inode() helper
>>>   sysctl: add support for drop_caches for individual filesystem
>>>   Documentation: add instructions for using 'drop_fs_caches sysctl'
>>>     sysctl
>>>
>>> Documentation/admin-guide/sysctl/vm.rst |  44 +++++++++
>>> fs/drop_caches.c                        | 125 ++++++++++++++++++++++++
>>> include/linux/mm.h                      |   1 +
>>> mm/internal.h                           |   3 +
>>> mm/shrinker.c                           |   4 +-
>>> mm/vmscan.c                             |  50 ++++++++++
>>> 6 files changed, 225 insertions(+), 2 deletions(-)
>>>
>>> -- 
>>> 2.34.1
>>>
>>
>> .
>>



  reply	other threads:[~2026-02-27  6:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-27  2:55 Ye Bin
2026-02-27  2:55 ` [PATCH v3 1/3] mm/vmscan: introduce drop_sb_dentry_inode() helper Ye Bin
2026-02-27  2:55 ` [PATCH v3 2/3] sysctl: add support for drop_caches for individual filesystem Ye Bin
2026-02-27  2:55 ` [PATCH v3 3/3] Documentation: add instructions for using 'drop_fs_caches sysctl' sysctl Ye Bin
2026-02-27  3:31 ` [PATCH v3 0/3] add support for drop_caches for individual filesystem Muchun Song
2026-02-27  6:39   ` yebin (H)
2026-02-27  6:50     ` Qi Zheng [this message]
2026-02-27  7:18       ` yebin (H)
2026-02-27  6:55     ` Muchun Song
2026-02-27  7:32       ` yebin (H)
2026-02-27  7:45         ` Muchun Song
2026-02-27  8:17           ` yebin (H)
2026-02-27  8:27             ` Muchun Song
2026-02-27  9:02               ` yebin (H)

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=e4834869-4144-41aa-b370-9c4e6091322e@linux.dev \
    --to=qi.zheng@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=david@fromorbit.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yebin10@huawei.com \
    --cc=yebin@huaweicloud.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