* + mm-page-writeback-avoid-unnecessary-strictlimit-background-wakeups.patch added to mm-new branch
@ 2026-11-09 5:34 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2026-11-09 5:34 UTC (permalink / raw)
To: mm-commits, willy, joannelkoong, jack, thnkslprpt, akpm
The patch titled
Subject: mm/page-writeback: avoid unnecessary strictlimit background wakeups
has been added to the -mm mm-new branch. Its filename is
mm-page-writeback-avoid-unnecessary-strictlimit-background-wakeups.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-page-writeback-avoid-unnecessary-strictlimit-background-wakeups.patch
This patch will later appear in the mm-new branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Note, mm-new is a provisional staging ground for work-in-progress
patches, and acceptance into mm-new is a notification for others take
notice and to finish up reviews. Please do not hesitate to respond to
review feedback and post updated versions to replace or incrementally
fixup patches in mm-new.
The mm-new branch of mm.git is not included in linux-next
If a few days of testing in mm-new is successful, the patch will me moved
into mm.git's mm-unstable branch, which is included in linux-next
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via various
branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there most days
------------------------------------------------------
From: Avi Weiss <thnkslprpt@gmail.com>
Subject: mm/page-writeback: avoid unnecessary strictlimit background wakeups
Date: Sun, 8 Nov 2026 10:54:57 +0200
balance_dirty_pages() includes pages under writeback in gdtc->wb_dirty
when checking the per-wb background threshold for strictlimit BDIs.
However, wb_over_bg_thresh() only considers reclaimable dirty pages when
deciding whether to start more background writeback.
This can repeatedly wake the background worker even when there are too few
dirty pages to write. In a 15-second FUSE writeback test, background
wakeup requests dropped from 2657 to 682 (74% drop), while writeback_start
events remained nearly unchanged at 99 and 98.
Check wb_over_bg_thresh() before starting background writeback through the
strictlimit condition. Leave the global background threshold check and
the wakeup required for dirty throttling unchanged.
Link: https://lore.kernel.org/20261108085456.2093096-2-thnkslprpt@gmail.com
Fixes: 0437906841d0 ("mm: start background writeback based on per-wb threshold for strictlimit BDIs")
Signed-off-by: Avi Weiss <thnkslprpt@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Joanne Koong <joannelkoong@gmail.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
---
mm/page-writeback.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/mm/page-writeback.c~mm-page-writeback-avoid-unnecessary-strictlimit-background-wakeups
+++ a/mm/page-writeback.c
@@ -1827,9 +1827,15 @@ static int balance_dirty_pages(struct bd
balance_domain_limits(mdtc, strictlimit);
}
+ /*
+ * gdtc->wb_dirty includes pages under writeback, so use it as
+ * a cheap preliminary check before wb_over_bg_thresh() decides
+ * whether background writeback is needed.
+ */
if (!writeback_in_progress(wb) &&
(nr_dirty > gdtc->bg_thresh ||
- (strictlimit && gdtc->wb_dirty > gdtc->wb_bg_thresh)))
+ (strictlimit && gdtc->wb_dirty > gdtc->wb_bg_thresh &&
+ wb_over_bg_thresh(wb))))
wb_start_background_writeback(wb);
/*
_
Patches currently in -mm which might be from thnkslprpt@gmail.com are
mm-page-writeback-avoid-unnecessary-strictlimit-background-wakeups.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-09 5:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 5:34 + mm-page-writeback-avoid-unnecessary-strictlimit-background-wakeups.patch added to mm-new branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.