Re: [PATCH v3] mm/page_alloc: prevent reporting pcp->batch = 0
From: Joshua Hahn
Date: Tue Dec 16 2025 - 09:56:08 EST
On Tue, 16 Dec 2025 14:34:17 +0000 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> On Tue, Dec 16, 2025 at 06:27:53AM -0800, Joshua Hahn wrote:
> > batch = min(zone_managed_pages(zone) >> 12, SZ_256K / PAGE_SIZE);
> > - if (batch < 1)
> > + if (batch <= 1)
> > batch = 1;
> >
>
> This seems like a no-op to me. Did you send the right patch?
Hello Matthew,
Thank you for the quick catch, you're totally right. In the original patch [1]
it is also supposed to just return 1 there, but I think I got flustered when
I initially got the bug report and forgot to include that [2]. Sorry for the
mistake, I'll send out a new version with the correct fix.
Thanks again, I hope you have a great day!
Joshua
[1] https://lore.kernel.org/all/20251009192933.3756712-3-joshua.hahnjy@xxxxxxxxx/
[2] https://lore.kernel.org/all/20251212015330.1874521-1-joshua.hahnjy@xxxxxxxxx/