All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ye Bin <yebin@huaweicloud.com>
To: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
	linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, yebin10@huawei.com
Subject: [PATCH v2 0/3] add support for drop_caches for individual filesystem
Date: Mon, 17 Nov 2025 19:27:32 +0800	[thread overview]
Message-ID: <20251117112735.4170831-1-yebin@huaweicloud.com> (raw)

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.
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 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):
  vfs: introduce reclaim_icache_sb() and reclaim_dcache_sb() 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 |  34 +++++++
 fs/dcache.c                             |  22 ++++
 fs/drop_caches.c                        | 127 ++++++++++++++++++++++++
 fs/inode.c                              |  21 ++++
 fs/internal.h                           |   1 +
 include/linux/dcache.h                  |   1 +
 6 files changed, 206 insertions(+)

-- 
2.34.1


             reply	other threads:[~2025-11-17 11:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17 11:27 Ye Bin [this message]
2025-11-17 11:27 ` [PATCH v2 1/3] vfs: introduce reclaim_icache_sb() and reclaim_dcache_sb() helper Ye Bin
2025-11-17 11:27 ` [PATCH v2 2/3] sysctl: add support for drop_caches for individual filesystem Ye Bin
2025-11-17 13:57   ` kernel test robot
2025-11-17 14:07   ` kernel test robot
2025-11-17 11:27 ` [PATCH v2 3/3] Documentation: add instructions for using 'drop_fs_caches sysctl' sysctl Ye Bin

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=20251117112735.4170831-1-yebin@huaweicloud.com \
    --to=yebin@huaweicloud.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yebin10@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 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.