[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251117112735.4170831-1-yebin@huaweicloud.com>
Date: Mon, 17 Nov 2025 19:27:32 +0800
From: Ye Bin <yebin@...weicloud.com>
To: viro@...iv.linux.org.uk,
brauner@...nel.org,
jack@...e.cz,
linux-fsdevel@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
yebin10@...wei.com
Subject: [PATCH v2 0/3] add support for drop_caches for individual filesystem
From: Ye Bin <yebin10@...wei.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
Powered by blists - more mailing lists