linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "yebin (H)" <yebin10@huawei.com>
To: Ye Bin <yebin@huaweicloud.com>, <viro@zeniv.linux.org.uk>,
	<brauner@kernel.org>, <jack@suse.cz>,
	<linux-fsdevel@vger.kernel.org>, <axboe@kernel.dk>,
	<linux-block@vger.kernel.org>, <agruenba@redhat.com>,
	<gfs2@lists.linux.dev>, <amir73il@gmail.com>, <mic@digikod.net>,
	<gnoack@google.com>, <paul@paul-moore.com>, <jmorris@namei.org>,
	<serge@hallyn.com>, <linux-security-module@vger.kernel.org>
Cc: <zhangxiaoxu5@huawei.com>
Subject: Re: [PATCH 00/11] fix hungtask due to repeated traversal of inodes list
Date: Wed, 4 Dec 2024 15:04:35 +0800	[thread overview]
Message-ID: <674FFF03.9080403@huawei.com> (raw)
In-Reply-To: <20241118114508.1405494-1-yebin@huaweicloud.com>

Friendly ping...

On 2024/11/18 19:44, Ye Bin wrote:
> 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(-)
>


  parent reply	other threads:[~2024-12-04  7:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` yebin (H) [this message]
2024-12-04 11:04 ` [PATCH 00/11] fix hungtask due to repeated traversal of inodes list Mateusz Guzik

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=674FFF03.9080403@huawei.com \
    --to=yebin10@huawei.com \
    --cc=agruenba@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=gfs2@lists.linux.dev \
    --cc=gnoack@google.com \
    --cc=jack@suse.cz \
    --cc=jmorris@namei.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mic@digikod.net \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=yebin@huaweicloud.com \
    --cc=zhangxiaoxu5@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).