Re: [PATCH] mm/vmalloc: clarify why vmap_range_noflush() might sleep
From: Brendan Jackman
Date: Mon Dec 08 2025 - 02:39:51 EST
Hi Anshuman, thanks a lot for taking a look.
On Mon Dec 8, 2025 at 6:41 AM UTC, Anshuman Khandual wrote:
> Please add <asm-generic/pgalloc.h> in mm/vmalloc.c - otherwise it does not
> get built as GFP_PGTABLE_KERNEL is not available. But otherwise LGTM.
Oh, but that's not correct, IIUC we shouldn't directly be including
asm-generic headers from here.
So while in principle GFP_PGTABLE_KERNEL is a sensible common
demoninator here, it doesn't actually exist at all everywhere, e.g. it
doesn't look like m68k defines it for Motorola.
So maybe the best way here is a really vague:
/*
* Different archs allocate pagetables in different ways, assume
* GFP_KERNEL as a common denominator.
*/
might_alloc(GFP_KERNEL)
... a bit yucky but I think still useful.
Any thoughts?