]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
writeback: Avoid softlockup when switching many inodes
authorJan Kara <jack@suse.cz>
Fri, 12 Sep 2025 10:38:36 +0000 (12:38 +0200)
committerChristian Brauner <brauner@kernel.org>
Fri, 19 Sep 2025 11:11:05 +0000 (13:11 +0200)
commit66c14dccd810d42ec5c73bb8a9177489dfd62278
treef7a32b05d3b14eebf91d6097a9d1dc819fddf977
parente1b849cfa6b61f1c866a908c9e8dd9b5aaab820b
writeback: Avoid softlockup when switching many inodes

process_inode_switch_wbs_work() can be switching over 100 inodes to a
different cgroup. Since switching an inode requires counting all dirty &
under-writeback pages in the address space of each inode, this can take
a significant amount of time. Add a possibility to reschedule after
processing each inode to avoid softlockups.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/fs-writeback.c