]> Gentwo Git Trees - linux/.git/commit
writeback: Wake up waiting tasks when finishing the writeback of a chunk.
authorJulian Sun <sunjunchao@bytedance.com>
Tue, 30 Sep 2025 08:53:15 +0000 (16:53 +0800)
committerChristian Brauner <brauner@kernel.org>
Mon, 20 Oct 2025 18:22:39 +0000 (20:22 +0200)
commit1888635532fbbd6be4a4368621085c3a197279f8
tree4c768f48356bc372075189dcbc5e61f64b8c7460
parent3a8660878839faadb4f1a6dd72c3179c1df56787
writeback: Wake up waiting tasks when finishing the writeback of a chunk.

Writing back a large number of pages can take a lots of time.
This issue is exacerbated when the underlying device is slow or
subject to block layer rate limiting, which in turn triggers
unexpected hung task warnings.

We can trigger a wake-up once a chunk has been written back and the
waiting time for writeback exceeds half of
sysctl_hung_task_timeout_secs.
This action allows the hung task detector to be aware of the writeback
progress, thereby eliminating these unexpected hung task warnings.

This patch has passed the xfstests 'check -g quick' test based on ext4,
with no additional failures introduced.

Signed-off-by: Julian Sun <sunjunchao@bytedance.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/fs-writeback.c
include/linux/backing-dev-defs.h