Re: [PATCHv2 3/8] mm: Accept memory in __alloc_pages_bulk().

From: Kirill A. Shutemov
Date: Mon Aug 12 2024 - 02:25:09 EST


On Fri, Aug 09, 2024 at 10:31:03AM -0500, Tom Lendacky wrote:
> On 8/9/24 06:48, Kirill A. Shutemov wrote:
> > Currently, the kernel only accepts memory in get_page_from_freelist(),
> > but there is another path that directly takes pages from free lists -
> > __alloc_page_bulk(). This function can consume all accepted memory and
> > will resort to __alloc_pages_noprof() if necessary.
> >
> > Conditionally accepted in __alloc_pages_bulk().
> >
> > The same issue may arise due to deferred page initialization. Kick the
> > deferred initialization machinery before abandoning the zone, as the
> > kernel does in get_page_from_freelist().
>
> Is the deferred page init issue an existing problem? In other words,
> should it be a separate patch with a Fixes: tag so it can go back to
> stable kernels?

Yes, it is existing problem, but the problem is transient (deferred thread
will add more pages) and there's fallback to __alloc_pages_noprof() which
knowns how to handle deferred pages. I don't think it is worth
backporting.

--
Kiryl Shutsemau / Kirill A. Shutemov