]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 19 Oct 2025 14:37:44 +0000 (16:37 +0200)
commit6d3563a6bfa62ae14df2248e813481f1c948b0b3
treed92151c58c8b0a6a98c5e4313a3872b9af105a7f
parent7381cd12252565a83f5060ee7e9bf3aa40e9265a
writeback: Avoid softlockup when switching many inodes

[ Upstream commit 66c14dccd810d42ec5c73bb8a9177489dfd62278 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/fs-writeback.c