Re: [PATCH v2 18/22] mm/page_alloc: introduce ALLOC_NOBLOCK
From: Gregory Price
Date: Fri May 15 2026 - 11:57:02 EST
On Fri, May 15, 2026 at 01:36:43PM +0000, Brendan Jackman wrote:
> On Wed May 13, 2026 at 9:43 AM UTC, Vlastimil Babka (SUSE) wrote:
> >
> > Is it safe to just combine them? You come with ALLOC_WMARK_LOW and combine
> > with ALLOC_WMARK_MIN from gfp_to_alloc_flags() but these are not bit flags,
> > I think you end up with ALLOC_WMARK_LOW effectively.
>
> Ah, thanks, I do remember thinking about this and deciding that it was
> safe but I probably just misunderstood the watermark code.
>
> This makes me a bit more attracted to the idea of a struct like Gregory
> suggested in [1]. Then this could be captured in the type system.
>
This might actually be a good precursor before pulling alloc_context any
further out. Since there's multiple paths into the lower layers with
alloc_context, maybe there should already be a sanity check of the alloc
flags anyway.
~Gregory