From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,ziy@nvidia.com,vbabka@kernel.org,
surenb@google.com,sj@kernel.org,mhocko@suse.com,mgorman@techsingularity.net,
hannes@cmpxchg.org,dev.jain@arm.com,david@kernel.org,
brendan.jackman@linux.dev,kas@kernel.org,akpm@linux-foundation.org
Subject: [merged _alloc/for-7.5/misc] mm-compaction-do-not-skip-the-free-scanners-periodic-lock-drop.patch removed from -mm tree
Date: Wed, 02 Dec 2026 08:19:53 -0800 [thread overview]
Message-ID: <20261202161954.866E51F0089C@smtp.kernel.org> (raw)
In-Reply-To: <20261116125746.2897395-1-kas@kernel.org>
The quilt patch titled
Subject: mm/compaction: do not skip the free scanner's periodic lock drop
has been removed from the -mm tree. Its filename was
mm-compaction-do-not-skip-the-free-scanners-periodic-lock-drop.patch
This patch was dropped because it was merged into _alloc/for-7.5/misc
------------------------------------------------------
From: "Kiryl Shutsemau (Meta)" <kas@kernel.org>
Subject: mm/compaction: do not skip the free scanner's periodic lock drop
Date: Mon, 16 Nov 2026 12:57:45 +0000
isolate_freepages_block() drops zone->lock, checks for a fatal signal
and calls cond_resched() at every pfn that is a multiple of
COMPACT_CLUSTER_MAX.
With a stride above one, the scan steps over a compound page, or over a
high-order free page it has just isolated, to a pfn that is not a
multiple of the stride. From there it never reaches a multiple of
COMPACT_CLUSTER_MAX, so the rest of the pageblock is scanned without the
check, possibly with zone->lock held and interrupts off.
Count probes instead, and check every COMPACT_CLUSTER_MAX of them.
Link: https://patch.msgid.link/20261116125746.2897395-1-kas@kernel.org
Fixes: 4fca9730c51d ("mm, compaction: sample pageblocks for free pages")
Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: SJ Park <sj@kernel.org>
Reviewed-by: Dev Jain <dev.jain@arm.com>
Reviewed-by: Zi Yan <ziy@nvidia.com>
Cc: Vlastimil Babka <vbabka@kernel.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: David Hildenbrand <david@kernel.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Brendan Jackman <brendan.jackman@linux.dev>
mm/compaction.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
--- a/mm/compaction.c~mm-compaction-do-not-skip-the-free-scanners-periodic-lock-drop
+++ a/mm/compaction.c
@@ -579,7 +579,7 @@ static unsigned long isolate_freepages_b
unsigned int stride,
bool strict)
{
- int nr_scanned = 0, total_isolated = 0;
+ int nr_scanned = 0, nr_probes = 0, total_isolated = 0;
struct page *page;
unsigned long flags = 0;
bool locked = false;
@@ -599,13 +599,15 @@ static unsigned long isolate_freepages_b
/*
* Periodically drop the lock (if held) regardless of its
* contention, to give chance to IRQs. Abort if fatal signal
- * pending.
+ * pending. Count probes rather than pfns, as the scan does not
+ * always land on a multiple of COMPACT_CLUSTER_MAX.
*/
- if (!(blockpfn % COMPACT_CLUSTER_MAX)
- && compact_unlock_should_abort(&cc->zone->lock, flags,
- &locked, cc))
+ if (!(nr_probes % COMPACT_CLUSTER_MAX) &&
+ compact_unlock_should_abort(&cc->zone->lock, flags,
+ &locked, cc))
break;
+ nr_probes++;
nr_scanned++;
/*
_
Patches currently in -mm which might be from kas@kernel.org are
prev parent reply other threads:[~2026-12-02 16:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 12:57 [PATCH] mm/compaction: do not skip the free scanner's periodic lock drop Kiryl Shutsemau (Meta)
2026-11-17 1:37 ` SJ Park
2026-11-17 10:29 ` Kiryl Shutsemau (Meta)
2026-11-17 5:34 ` Dev Jain
2026-11-17 10:28 ` Kiryl Shutsemau (Meta)
2026-11-17 17:29 ` Zi Yan
2026-12-02 2:18 ` + mm-compaction-do-not-skip-the-free-scanners-periodic-lock-drop.patch added to mm-new branch Andrew Morton
2026-12-02 9:12 ` [PATCH] mm/compaction: do not skip the free scanner's periodic lock drop Vlastimil Babka (SUSE)
2026-12-02 16:19 ` Andrew Morton [this message]
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=20261202161954.866E51F0089C@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=brendan.jackman@linux.dev \
--cc=david@kernel.org \
--cc=dev.jain@arm.com \
--cc=hannes@cmpxchg.org \
--cc=kas@kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@suse.com \
--cc=mm-commits@vger.kernel.org \
--cc=sj@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=ziy@nvidia.com \
/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 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.