1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-11 17:10:13 +00:00
Joshua Hahn 0c75714095 mm/page_alloc: report 1 as zone_batchsize for !CONFIG_MMU
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 <joshua.hahnjy@gmail.com>
Reported-by: Daniel Palmer <daniel@thingy.jp>
Closes: https://lore.kernel.org/linux-mm/CAFr9PX=_HaM3_xPtTiBn5Gw5-0xcRpawpJ02NStfdr0khF2k7g@mail.gmail.com/
Reported-by: Guenter Roeck <linux@roeck-us.net>
Closes: https://lore.kernel.org/all/42143500-c380-41fe-815c-696c17241506@roeck-us.net/
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Tested-by: Daniel Palmer <daniel@thingy.jp>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: SeongJae Park <sj@kernel.org>
Tested-by: Hajime Tazaki <thehajime@gmail.com>
Cc: Brendan Jackman <jackmanb@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Zi Yan <ziy@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-12-23 11:23:16 -08:00
..
2025-11-20 13:43:57 -08:00
2025-12-05 17:01:20 -08:00
2025-11-29 10:41:08 -08:00
2025-11-24 15:08:52 -08:00
2025-11-29 10:41:08 -08:00
2025-12-03 10:45:47 -08:00
2025-11-16 17:27:52 -08:00
2025-12-05 17:01:20 -08:00
2025-12-03 11:53:47 -08:00
2025-11-24 15:08:54 -08:00
2025-09-13 16:55:07 -07:00
2025-09-13 16:54:46 -07:00
2025-11-24 15:08:54 -08:00
2025-12-11 08:54:08 +09:00
2025-12-20 11:24:42 -08:00
2025-12-01 10:26:38 -08:00
2025-11-20 13:43:58 -08:00
2025-12-13 20:35:41 +12:00
2025-09-21 14:21:59 -07:00
2025-11-16 17:27:57 -08:00