linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] fix hungtask due to repeated traversal of inodes list
@ 2024-11-18 11:44 Ye Bin
  2024-11-18 11:44 ` [PATCH 01/11] fs: introduce I_CURSOR flag for inode Ye Bin
                   ` (12 more replies)
  0 siblings, 13 replies; 16+ messages in thread
From: Ye Bin @ 2024-11-18 11:44 UTC (permalink / raw)
  To: viro, brauner, jack, linux-fsdevel, axboe, linux-block, agruenba,
	gfs2, amir73il, mic, gnoack, paul, jmorris, serge,
	linux-security-module
  Cc: yebin10, zhangxiaoxu5

From: Ye Bin <yebin10@huawei.com>

As commit 04646aebd30b ("fs: avoid softlockups in s_inodes iterators")
introduces the retry logic. In the problem environment, the 'i_count'
of millions of files is not zero. As a result, the time slice for each
traversal to the matching inode process is almost used up, and then the
traversal is started from scratch. The worst-case scenario is that only
one inode can be processed after each wakeup. Because this process holds
a lock, other processes will be stuck for a long time, causing a series
of problems.
To solve the problem of repeated traversal from the beginning, each time
the CPU needs to be freed, a cursor is inserted into the linked list, and
the traversal continues from the cursor next time.

Ye Bin (11):
  fs: introduce I_CURSOR flag for inode
  block: use sb_for_each_inodes API
  fs: use sb_for_each_inodes API
  gfs2: use sb_for_each_inodes API
  fs: use sb_for_each_inodes_safe API
  fsnotify: use sb_for_each_inodes API
  quota: use sb_for_each_inodes API
  fs/super.c: use sb_for_each_inodes API
  landlock: use sb_for_each_inodes API
  fs: fix hungtask due to repeated traversal of inodes list
  fs: fix potential soft lockup when 'sb->s_inodes' has large number of
    inodes

 block/bdev.c           |  4 +--
 fs/drop_caches.c       |  2 +-
 fs/gfs2/ops_fstype.c   |  2 +-
 fs/inode.c             | 59 ++++++++++++++++++++++++++++--------------
 fs/notify/fsnotify.c   |  2 +-
 fs/quota/dquot.c       |  4 +--
 fs/super.c             |  2 +-
 include/linux/fs.h     | 45 ++++++++++++++++++++++++++++++++
 security/landlock/fs.c |  2 +-
 9 files changed, 93 insertions(+), 29 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-12-04 14:16 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-18 11:44 [PATCH 00/11] fix hungtask due to repeated traversal of inodes list Ye Bin
2024-11-18 11:44 ` [PATCH 01/11] fs: introduce I_CURSOR flag for inode Ye Bin
2024-11-18 11:44 ` [PATCH 02/11] block: use sb_for_each_inodes API Ye Bin
2024-11-18 11:45 ` [PATCH 03/11] fs: " Ye Bin
2024-11-18 11:45 ` [PATCH 04/11] gfs2: " Ye Bin
2024-11-18 11:45 ` [PATCH 05/11] fs: use sb_for_each_inodes_safe API Ye Bin
2024-11-18 11:45 ` [PATCH 06/11] fsnotify: use sb_for_each_inodes API Ye Bin
2024-11-18 11:45 ` [PATCH 07/11] quota: " Ye Bin
2024-11-18 11:45 ` [PATCH 08/11] fs/super.c: " Ye Bin
2024-11-18 11:45 ` [PATCH 09/11] landlock: " Ye Bin
2024-11-18 11:45 ` [PATCH 10/11] fs: fix hungtask due to repeated traversal of inodes list Ye Bin
2024-12-04 11:17   ` Christian Brauner
2024-12-04 14:16     ` Jan Kara
2024-11-18 11:45 ` [PATCH 11/11] fs: fix potential soft lockup when 'sb->s_inodes' has large number of inodes Ye Bin
2024-12-04  7:04 ` [PATCH 00/11] fix hungtask due to repeated traversal of inodes list yebin (H)
2024-12-04 11:04 ` Mateusz Guzik

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).