Re: [PATCH] rust: alloc: add GFP_NOIO flag
From: Andreas Hindborg
Date: Wed Jan 28 2026 - 15:33:47 EST
"Danilo Krummrich" <dakr@xxxxxxxxxx> writes:
> On Wed Jan 28, 2026 at 7:37 PM CET, Andreas Hindborg wrote:
>> + /// [`GFP_NOIO`] will use direct reclaim to discard clean pages or slab
>> + /// pages that do not require the starting of any physical IO.
>> + pub const GFP_NOIO: Flags = Flags(bindings::GFP_NOIO);
>
> How do you use this? What about abstractions for memalloc_noio_{save,restore}()
> instead?
I use it to allocate memory for backing storage in rust null block. The
allocation is done during processing of disk IO:
page: Page::alloc_page(GFP_NOIO | __GFP_ZERO)?,
Best regards,
Andreas Hindborg