mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laveesh Bansal <laveeshb@laveeshbansal.com>
To: viro@zeniv.linux.org.uk, brauner@kernel.org
Cc: jack@suse.cz, tytso@mit.edu, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Laveesh Bansal <laveeshb@laveeshbansal.com>
Subject: [PATCH v2 0/2] Fix vm.dirtytime_expire_seconds=0 causing 100% CPU
Date: Tue,  6 Jan 2026 14:50:57 +0000	[thread overview]
Message-ID: <20260106145059.543282-1-laveeshb@laveeshbansal.com> (raw)

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

v2:
- Added Reviewed-by from Jan Kara (no code changes)

Laveesh Bansal (2):
  writeback: fix 100% CPU usage when dirtytime_expire_interval is 0
  docs: clarify that dirtytime_expire_seconds=0 disables writeback

 Documentation/admin-guide/sysctl/vm.rst |  2 ++
 fs/fs-writeback.c                       | 14 ++++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

--
2.43.0


             reply	other threads:[~2026-01-06 14:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-06 14:50 Laveesh Bansal [this message]
2026-01-06 14:50 ` [PATCH v2 1/2] writeback: fix 100% CPU usage when dirtytime_expire_interval is 0 Laveesh Bansal
2026-01-06 14:50 ` [PATCH v2 2/2] docs: clarify that dirtytime_expire_seconds=0 disables writeback Laveesh Bansal
2026-01-12 10:07 ` [PATCH v2 0/2] Fix vm.dirtytime_expire_seconds=0 causing 100% CPU Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260106145059.543282-1-laveeshb@laveeshbansal.com \
    --to=laveeshb@laveeshbansal.com \
    --cc=brauner@kernel.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tytso@mit.edu \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®