From: Joshua Hahn <joshua.hahnjy@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Daniel Palmer <daniel@0x0f.com>,
Brendan Jackman <jackmanb@google.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@suse.com>,
Suren Baghdasaryan <surenb@google.com>,
Vlastimil Babka <vbabka@suse.cz>, Zi Yan <ziy@nvidia.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm/page_alloc: restore 0-handling to zone_set_pageset_high_and_batch
Date: Thu, 18 Dec 2025 00:35:09 -0800 [thread overview]
Message-ID: <20251218083510.2462817-1-joshua.hahnjy@gmail.com> (raw)
In-Reply-To: <db40ce77-4762-4d99-b03a-439c977ba1b8@roeck-us.net>
On Wed, 17 Dec 2025 08:47:12 -0800 Guenter Roeck <linux@roeck-us.net> wrote:
> On Tue, Dec 16, 2025 at 10:05:03PM -0800, Joshua Hahn 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.
> >
> > Since in the NOMMU case the reported-to-user batchsize should still be 0,
> > we would only like the error handling to exist in the callsites that
> > set the internal value for the zone (i.e. zone_set_pageset_high_and_batch).
> >
> > Restore max(1, zone_batchsize(zone)) to the callsite to prevent errors
> > on NOMMU systems.
> >
> > Fixes: 2783088ef24e ("mm/page_alloc: prevent reporting pcp->batch = 0")
> > 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/
> > Signed-off-by: Joshua Hahn <joshua.hahnjy@gmail.com>
>
> For m68k:mcf5208evb boot tests with qemu:
>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
>
> Guenter
Hello Guenter, thank you so much for spending the time to test my patch!
I've gone ahead and took Vlastimil's suggestion, which just returns 1
for zone_batchsize for NOMMU systems. Functionally, it should be the same
but I thought it might be best not to carry the tested-by tag over, since
the code changed in its implementation.
Thank you again for testing the code, and sorry for the bug in the first place.
Have a great day!
Joshua
prev parent reply other threads:[~2025-12-18 8:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-17 6:05 Joshua Hahn
2025-12-17 11:12 ` Vlastimil Babka
2025-12-17 11:23 ` Vlastimil Babka
2025-12-17 13:02 ` Joshua Hahn
2025-12-17 13:19 ` Vlastimil Babka
2025-12-17 14:59 ` Joshua Hahn
2025-12-17 16:47 ` Guenter Roeck
2025-12-18 8:35 ` Joshua Hahn [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=20251218083510.2462817-1-joshua.hahnjy@gmail.com \
--to=joshua.hahnjy@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=daniel@0x0f.com \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@roeck-us.net \
--cc=mhocko@suse.com \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox