From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FA2C2356C9 for ; Thu, 18 Dec 2025 23:01:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766098862; cv=none; b=d/PkvVszXZLxkQr0i7t1Alz1HNat8FTFHYJKsvoZD0b/AP/25CHzbMsV+UhzJt1pWS87CTpvvHlhfD5HLmaY62egNtFjMh23dbAbTjVt+bAzwD1aazbggggNGCVAOgnPwD2IvMGIVCYXTlHgIkys4iseDjborMjy3CeoBdZjnVw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766098862; c=relaxed/simple; bh=Q03Iw9SnbKmRX+cOpabE/DWcKtaOHLyFIdvywxBdq+0=; h=Date:To:From:Subject:Message-Id; b=MjxRm8G3VPvD/gy3qTcyuchjIdnExI6ynpWvdjN9yI5nj/gsP7akuozdFRVbCJ6aOj16WjWbuILTLDVYcrv9i1eENSBOpxceE7AQW2gjA/aa8yfM4WGxr4/vcMDjBg591OFB5m3Z0ITKmduiY+BkENSIwckk/LtpocJTgMgshq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=k/uYHToa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="k/uYHToa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B06C9C4CEFB; Thu, 18 Dec 2025 23:01:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1766098860; bh=Q03Iw9SnbKmRX+cOpabE/DWcKtaOHLyFIdvywxBdq+0=; h=Date:To:From:Subject:From; b=k/uYHToarU6RhCKTH2kfd921KnYM14OejyGMu0+dyQICmPERbVoFpNDw6YskYCSU0 I6JwySQ5TBExF9FoKu+fuLgUTtZR1osmCIt6pIKZuBS/w1EPF2UlAJ6cb1d9niswdr xtTqnHZix+2vA5irukQnvKwIa14qouiznZwrvXZ8= Date: Thu, 18 Dec 2025 15:01:00 -0800 To: mm-commits@vger.kernel.org,ziy@nvidia.com,vbabka@suse.cz,surenb@google.com,mhocko@suse.com,linux@roeck-us.net,jackmanb@google.com,hannes@cmpxchg.org,daniel@thingy.jp,joshua.hahnjy@gmail.com,akpm@linux-foundation.org From: Andrew Morton Subject: + mm-page_alloc-report-1-as-zone_batchsize-for-config_mmu.patch added to mm-hotfixes-unstable branch Message-Id: <20251218230100.B06C9C4CEFB@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: mm/page_alloc: report 1 as zone_batchsize for !CONFIG_MMU has been added to the -mm mm-hotfixes-unstable branch. Its filename is mm-page_alloc-report-1-as-zone_batchsize-for-config_mmu.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-page_alloc-report-1-as-zone_batchsize-for-config_mmu.patch This patch will later appear in the mm-hotfixes-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm 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: Joshua Hahn Subject: mm/page_alloc: report 1 as zone_batchsize for !CONFIG_MMU Date: Thu, 18 Dec 2025 00:31:59 -0800 Commit 2783088ef24e ("mm/page_alloc: prevent reporting pcp->batch = 0") moved the error handling (0-handling) of zone_batchsize from its callers to inside the function. However, the commit left out the error handling for the NOMMU case, leading to deadlocks on NOMMU systems. For NOMMU systems, return 1 instead of 0 for zone_batchsize, which restores the previous deadlock-free behavior. There is no functional difference expected with this patch before commit 2783088ef24e, other than the pr_debug in zone_pcp_init now printing out 1 instead of 0 for zones in NOMMU systems. Not only is this a pr_debug, the difference is purely semantic anyways. Link: https://lkml.kernel.org/r/20251218083200.2435789-1-joshua.hahnjy@gmail.com Fixes: 2783088ef24e ("mm/page_alloc: prevent reporting pcp->batch = 0") Signed-off-by: Joshua Hahn Reported-by: Daniel Palmer Closes: https://lore.kernel.org/linux-mm/CAFr9PX=_HaM3_xPtTiBn5Gw5-0xcRpawpJ02NStfdr0khF2k7g@mail.gmail.com/ Reported-by: Guenter Roeck Closes: https://lore.kernel.org/all/42143500-c380-41fe-815c-696c17241506@roeck-us.net/ Reviewed-by: Vlastimil Babka Tested-by: Daniel Palmer Tested-by: Guenter Roeck Cc: Brendan Jackman Cc: Johannes Weiner Cc: Michal Hocko Cc: Suren Baghdasaryan Cc: Zi Yan Signed-off-by: Andrew Morton --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/page_alloc.c~mm-page_alloc-report-1-as-zone_batchsize-for-config_mmu +++ a/mm/page_alloc.c @@ -5924,7 +5924,7 @@ static int zone_batchsize(struct zone *z * recycled, this leads to the once large chunks of space being * fragmented and becoming unavailable for high-order allocations. */ - return 0; + return 1; #endif } _ Patches currently in -mm which might be from joshua.hahnjy@gmail.com are mm-page_alloc-report-1-as-zone_batchsize-for-config_mmu.patch