From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,ziy@nvidia.com,vbabka@kernel.org,surenb@google.com,mhocko@suse.com,hannes@cmpxchg.org,brendan.jackman@linux.dev,liuqiqi@kylinos.cn,akpm@linux-foundation.org
Subject: [merged mm-stable] mm-page_alloc-apply-per-task-gfp-context-in-bulk-allocator.patch removed from -mm tree
Date: Mon, 12 Oct 2026 21:32:24 -0700 [thread overview]
Message-ID: <20261013043224.908571F000FF@smtp.kernel.org> (raw)
The quilt patch titled
Subject: mm/page_alloc: apply per-task GFP context in bulk allocator
has been removed from the -mm tree. Its filename was
mm-page_alloc-apply-per-task-gfp-context-in-bulk-allocator.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Qiqi Liu <liuqiqi@kylinos.cn>
Subject: mm/page_alloc: apply per-task GFP context in bulk allocator
Date: Tue, 15 Sep 2026 15:49:28 +0800
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.
By ignoring PF_MEMALLOC_NOIO and PF_MEMALLOC_NOFS, the allocation can
theoretically result in a deadlock.
Ignoring PF_MEMALLOC_PIN also has consequences: without clearing
__GFP_MOVABLE, prepare_alloc_pages() selects MIGRATE_MOVABLE for the PCP
list, and a task with PF_MEMALLOC_PIN set receives movable pages from the
bulk allocator. Once pinned, these pages can no longer be migrated but
remain in MOVABLE pageblocks, violating the mobility contract. This can
increase fragmentation and interfere with compaction or contiguous-memory
allocations, eventually surfacing as higher allocation latency or
allocation failures under memory pressure.
Found via review of the bulk allocation tracepoint hooks [1].
Link: https://sashiko.dev/#/patchset/20260907120949.418450-1-liuqiqi%40kylinos.cn
Link: https://lore.kernel.org/all/20260907120949.418450-1-liuqiqi@kylinos.cn/ [1]
Link: https://lore.kernel.org/20260915074928.327471-1-liuqiqi@kylinos.cn
Fixes: 387ba26fb1cb ("mm/page_alloc: add a bulk page allocator")
Signed-off-by: Qiqi Liu <liuqiqi@kylinos.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Cc: Brendan Jackman <brendan.jackman@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Cc: Zi Yan <ziy@nvidia.com>
---
mm/page_alloc.c | 1 +
1 file changed, 1 insertion(+)
--- a/mm/page_alloc.c~mm-page_alloc-apply-per-task-gfp-context-in-bulk-allocator
+++ a/mm/page_alloc.c
@@ -5189,6 +5189,7 @@ unsigned long alloc_pages_bulk_noprof(gf
/* May set ALLOC_NOFRAGMENT, fragmentation will return 1 page. */
gfp &= gfp_allowed_mask;
+ gfp = current_gfp_context(gfp);
if (!prepare_alloc_pages(gfp, 0, preferred_nid, nodemask, &ac, &gfp, &alloc_flags))
goto out;
_
Patches currently in -mm which might be from liuqiqi@kylinos.cn are
reply other threads:[~2026-10-13 4:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261013043224.908571F000FF@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=brendan.jackman@linux.dev \
--cc=hannes@cmpxchg.org \
--cc=liuqiqi@kylinos.cn \
--cc=mhocko@suse.com \
--cc=mm-commits@vger.kernel.org \
--cc=surenb@google.com \
--cc=vbabka@kernel.org \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.