Commit 9eed043
writeback: Fix wakeup and logging timeouts for !DETECT_HUNG_TASK
Recent changes of fs-writeback cause such warnings if DETECT_HUNG_TASK
is not enabled:
INFO: The task sync:1342 has been waiting for writeback completion for more than 1 seconds.
The reason is sysctl_hung_task_timeout_secs is 0 when DETECT_HUNG_TASK
is not enabled, then it causes the warning message even if the writeback
lasts for only one second.
Guard the wakeup and logging with "#ifdef CONFIG_DETECT_HUNG_TASK" can
eliminate the warning messages. But on the other hand, it is possible
that sysctl_hung_task_timeout_secs be also 0 when DETECT_HUNG_TASK is
enabled. So let's just check the value of sysctl_hung_task_timeout_secs
to decide whether do wakeup and logging.
Fixes: 1888635 ("writeback: Wake up waiting tasks when finishing the writeback of a chunk.")
Fixes: d6e6215 ("writeback: Add logging for slow writeback (exceeds sysctl_hung_task_timeout_secs)")
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Link: https://patch.msgid.link/20260203094014.2273240-1-chenhuacai@loongson.cn
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Christian Brauner <brauner@kernel.org>1 parent cb184dd commit 9eed043
1 file changed
Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
204 | | - | |
| 205 | + | |
205 | 206 | | |
206 | 207 | | |
207 | 208 | | |
| |||
1955 | 1956 | | |
1956 | 1957 | | |
1957 | 1958 | | |
| 1959 | + | |
1958 | 1960 | | |
1959 | 1961 | | |
1960 | 1962 | | |
| |||
2041 | 2043 | | |
2042 | 2044 | | |
2043 | 2045 | | |
2044 | | - | |
2045 | | - | |
2046 | | - | |
| 2046 | + | |
| 2047 | + | |
2047 | 2048 | | |
2048 | 2049 | | |
2049 | 2050 | | |
| |||
0 commit comments