Re: [PATCH] mm/page_alloc: apply per-task GFP context in bulk allocator
From: Andrew Morton
Date: Sun Sep 13 2026 - 23:24:16 EST
On Mon, 14 Sep 2026 10:45:55 +0800 Qiqi Liu <liuqiqi@xxxxxxxxxx> wrote:
> alloc_pages_bulk_noprof() does not call current_gfp_context(), so
> per-task scoped allocation constraints (PF_MEMALLOC_NOIO,
> PF_MEMALLOC_NOFS, PF_MEMALLOC_PIN) are not applied on the bulk fast
> path.
>
> The most direct consequence is PF_MEMALLOC_PIN: without clearing
> __GFP_MOVABLE, prepare_alloc_pages() selects MIGRATE_MOVABLE for the
> PCP list, and a task under memalloc_pin_save() receives movable
> pages from the bulk allocator.
Thanks.
When fixing a bug, please ensure that the changelog fully describes the
userspace-visible runtime effects of the bug.
> Fixes: 387ba26fb1cb ("mm/page_alloc: add a bulk page allocator")
> Cc: stable@xxxxxxxxxxxxxxx
Especially when proposing a backport.
I asked $LLM this question and was told
> This can increase fragmentation and interfere with compaction or
> contiguous-memory allocations, eventually surfacing as higher
> allocation latency or allocation failures under memory pressure.
which wasn't so hard. Please update your organization's prompts to
ensure that this information is always included in changelogs. And, as
always, carefully review the LLM's output.
Other useful info to include in bugfix changelogs:
- how was this detected?
- is there a report from a real-world user? Reported-by:/Closes:
- is there a reproducer/test-case? Did the patch fix it?