Re: [PATCH 00/17] replace __get_free_pages() call with kmalloc()

From: Mike Rapoport

Date: Thu Jun 11 2026 - 05:11:18 EST


On Fri, Jun 05, 2026 at 04:00:33PM -0400, Zi Yan wrote:
> On 23 May 2026, at 13:54, Mike Rapoport (Microsoft) wrote:
>
> > This is a (small) part of larger work of replacing page allocator calls
> > with kmalloc.
>
> Is the goal to get rid of __get_free_page(s)()?

Yes, eventually.

My initial intention a few month ago was to remove the ugly casts [1], but
then willy pointed out that Linus objected to something like this [2] and
it looks like more than a decade old technical debt.

Since there are more than 600 or those it will take a while to convert
suitable gfp calls to kmalloc.
Afterwards we can re-evaluate what APIs we want to provide for allocations
that must have actual pages.

[1] https://lore.kernel.org/all/20251018093002.3660549-1-rppt@xxxxxxxxxx/
[2] https://lore.kernel.org/all/CA+55aFwp4iy4rtX2gE2WjBGFL=NxMVnoFeHqYa2j1dYOMMGqxg@xxxxxxxxxxxxxx/


> Thanks.

--
Sincerely yours,
Mike.