Re: [PATCH v3 00/16] mm: Some cleanups for page allocator APIs

From: Brendan Jackman

Date: Mon Jun 29 2026 - 11:28:14 EST


On Mon, 29 Jun 2026 at 16:30, Brendan Jackman <jackmanb@xxxxxxxxxx> wrote:
>
> On Mon, 29 Jun 2026 at 16:00, Mike Rapoport <rppt@xxxxxxxxxx> wrote:
> >
> > Hi Brendan,
> >
> > On Mon, Jun 29, 2026 at 01:11:49PM +0000, Brendan Jackman wrote:
> > >
> > > Some tweaks and cleanups for page allocator entrypoint and flags. This
> > > is motivated by preparation for __GFP_UNMAPPED [1] (which will probably
> > > become ALLOC_UNMAPPED in its next iteration), but all this is supposed
> > > to be an improvement to the codebase in its own right: unifying code
> > > paths, reducing API surface, and removing GFP flags.
> > >
> > > Tested:
> > >
> > > - KVM, mm, and BPF selftests in a QEMU VM
> > >
> > > - kunit.py on x86_64
> > >
> > > - For the ALLOC_NO_CODETAG bits I just booted a VM and read
> > > /proc/allocinfo. I confirmed that if I remove ALLOC_NO_CODETAG, the
> > > kernel crashes in early boot, so I was at least booting code that
> > > depends on this logic.
> >
> > Heads up before the full kbuild report:
> >
> > CI has tested the following submission:
> > Status: FAILURE
> > Name: [v3,00/16] mm: Some cleanups for page allocator APIs
> > Patchwork: https://patchwork.kernel.org/project/linux-mm/list/?series=1118244&state=*
> > Matrix: https://github.com/linux-mm/linux-mm/actions/runs/28375636866
>
> Agh, thanks, I broke the build for CMA.
>
> I thought I had this covered in my local test scripts. I will fix that
> first then I'll send a fixup for the patch.

OK my scripts are indeed checking CMA, the issue is that I didn't
build with NUMA_BALANCING.

I guess Suren was right[0] and I really should build allmodconfig (at
least vmlinux) before sending patches. I was a bit skeptical that this
was an especially useful config to build, but now I realise it just
maximises coverage, even if it does so under a pretty arbitrary
configuration.

[0] https://lore.kernel.org/all/CAJuCfpHAMaK2sZYSgS750CvgksCKEfOmLzZasXdBup+CrS-3Pg@xxxxxxxxxxxxxx/

Here are the fixes:

diff --git i/mm/migrate.c w/mm/migrate.c
index d9b23909d716c..8e0a6fb3f6618 100644
--- i/mm/migrate.c
+++ w/mm/migrate.c
@@ -49,6 +49,7 @@
#include <trace/events/migrate.h>

#include "internal.h"
+#include "page_alloc.h"
#include "swap.h"

static const struct movable_operations *offline_movable_ops;
diff --git i/mm/page_reporting.c w/mm/page_reporting.c
index 7418f2e500bb4..c7325704c3202 100644
--- i/mm/page_reporting.c
+++ w/mm/page_reporting.c
@@ -8,6 +8,7 @@
#include <linux/delay.h>
#include <linux/scatterlist.h>

+#include "page_alloc.h"
#include "page_reporting.h"
#include "internal.h"

diff --git i/mm/shuffle.c w/mm/shuffle.c
index fb1393b8b3a9d..82a2c7725a08a 100644
--- i/mm/shuffle.c
+++ w/mm/shuffle.c
@@ -7,6 +7,7 @@
#include <linux/random.h>
#include <linux/moduleparam.h>
#include "internal.h"
+#include "page_alloc.h"
#include "shuffle.h"

DEFINE_STATIC_KEY_FALSE(page_alloc_shuffle_key);