Re: [PATCH v2] mm/page_alloc: Report 1 as zone_batchsize for !CONFIG_MMU
From: Daniel Palmer
Date: Thu Dec 18 2025 - 07:31:02 EST
Hi Joshua,
On Thu, 18 Dec 2025 at 17:32, Joshua Hahn <joshua.hahnjy@xxxxxxxxx> wrote:
>
> 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.
Tested this on my 68000 setup, filled the memory to cause an OOM and I
got OOM instead of deadlock as expected.
Tested-by: Daniel Palmer <daniel@xxxxxxxxx>
FWIW There was a BoF about NOMMU at LPC last week and I did mention to
the people presenting that seem to be using NOMMU in real world
applications that NOMMU was broken in mainline. I hoped they would
have chimed in on this..
Thanks!
Daniel