From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796228395; b=QOOaPM2GVpFMUx2FRqOLuZhJOhHh5et0LLsCusGnFT8LvaC5Xx+vpuoKbdWSkw5MzQoa 1/K9fYebs+uygth0glQoSREhjjxjz3o9H4WzvNBHieMQ/4H6IKNkbj6uiKMwVTNn3G0OZ iR1/p4fLUZRAhqw4UvDYq88EVRTpPJQTMRD9kk/WRsmk/mYrCbh/e1UwPoOB0Fwr6t41Y ADemCRfn1ZBx4GLAlydLeWjaAHqbqUd0fcEvZ7OV76DIPk/aTH+ixp6aF++awRih+lgMq qcj0RMHVKVpqZnWFX566qaPdIjmiQHbG4enW2wMn/Ur34gsN41gmruCef5k4paKSNaw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796228395; h=Received:DKIM-Signature:Date:To:From:In-Reply-To:References:Subject: Message-Id; bh=cThwbGDR+d3G4Zj+9m/VGAhTA5AEazN9CvfmsfrTSYE=; b=DVvYnWm5w7fEcIPSF259FsrP7FzJeV/AzeQ0YldXvAYabQxV5Z7+ORnig9vBioFNmLDk rouSac531vMylU5uNlKEt1P9zdJBNfQwKlwacig01F1crAWvjpw0/Do+ErJjt5ODXaAf5 A4B+De7PoJsYY94CedOrdYuLmj5Fe53I1RMZ+B9eGjFGeW4OuD9urRdrsnD2NSnfNlTP+ lUVDYcM4895fg1JmzlJnU5UEObq/KP36ZVNmCVwseWOKEBOE5FoPdcWUBxM3iCZrsr4M8 zWm820TYz3Sws6rgHgNPJIr+TZvVd7fh0umJkid7OHAB+VL6/OZEnds/zAC9GrWz7Rw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=ZuFH6Di8; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F208D606A337 for ; Wed, 2 Dec 2026 16:19:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux-foundation.org header.i=@linux-foundation.org header.a=rsa-sha256 header.s=korg header.b=ZuFH6Di8 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 866E51F0089C; Wed, 2 Dec 2026 16:19:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1796228394; bh=cThwbGDR+d3G4Zj+9m/VGAhTA5AEazN9CvfmsfrTSYE=; h=Date:To:From:In-Reply-To:References:Subject; b=ZuFH6Di845tgFqyNjHzKLXaBT0KgGPuRMB80DKvt+3quANaWXZ11ALusZpiMukZzP g52u1ozS+k2xqFbdh6OZNiBRY3zpyk/cnCg+Ob5BY3s6DrwrshWRIEAvrtFQpKtXF9 R2CwpD47i33wzMBp4y4keuNjX+ikXE+45+wt8cGg= Date: Wed, 02 Dec 2026 08:19:53 -0800 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 From: Andrew Morton In-Reply-To: <20261116125746.2897395-1-kas@kernel.org> References: <20261116125746.2897395-1-kas@kernel.org> Subject: [merged _alloc/for-7.5/misc] mm-compaction-do-not-skip-the-free-scanners-periodic-lock-drop.patch removed from -mm tree Message-Id: <20261202161954.866E51F0089C@smtp.kernel.org> X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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)" 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) Signed-off-by: Andrew Morton Reviewed-by: SJ Park Reviewed-by: Dev Jain Reviewed-by: Zi Yan Cc: Vlastimil Babka Cc: Johannes Weiner Cc: David Hildenbrand Cc: Mel Gorman Cc: Suren Baghdasaryan Cc: Michal Hocko Cc: Brendan Jackman 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