Commit e166880
committed
Merge patch series "Fix vm.dirtytime_expire_seconds=0 causing 100% CPU"
Laveesh Bansal <laveeshb@laveeshbansal.com> says:
Setting vm.dirtytime_expire_seconds to 0 causes wakeup_dirtytime_writeback()
to reschedule itself with a delay of 0, creating an infinite busy loop that
spins kworker at 100% CPU.
This series:
- Patch 1: Fixes the bug by handling interval=0 as "disable writeback"
(consistent with dirty_writeback_centisecs behavior)
- Patch 2: Documents that setting the value to 0 disables writeback
Tested by booting kernels in QEMU with virtme-ng:
- Buggy kernel: kworker CPU spikes to ~73% when interval set to 0
- Fixed kernel: CPU remains normal, writeback correctly disabled
- Re-enabling (0 -> non-zero): writeback resumes correctly
* patches from https://patch.msgid.link/20260106145059.543282-1-laveeshb@laveeshbansal.com:
docs: clarify that dirtytime_expire_seconds=0 disables writeback
writeback: fix 100% CPU usage when dirtytime_expire_interval is 0
Link: https://patch.msgid.link/20260106145059.543282-1-laveeshb@laveeshbansal.com
Signed-off-by: Christian Brauner <brauner@kernel.org>2 files changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
234 | 236 | | |
235 | 237 | | |
236 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2492 | 2492 | | |
2493 | 2493 | | |
2494 | 2494 | | |
2495 | | - | |
| 2495 | + | |
| 2496 | + | |
2496 | 2497 | | |
2497 | 2498 | | |
2498 | 2499 | | |
| |||
2501 | 2502 | | |
2502 | 2503 | | |
2503 | 2504 | | |
2504 | | - | |
2505 | | - | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
2506 | 2511 | | |
2507 | 2512 | | |
2508 | 2513 | | |
| |||
2519 | 2524 | | |
2520 | 2525 | | |
2521 | 2526 | | |
2522 | | - | |
| 2527 | + | |
| 2528 | + | |
2523 | 2529 | | |
2524 | 2530 | | |
2525 | 2531 | | |
| |||
0 commit comments