Re: [PATCH 0/5] mm: Switch gfp_t to unsigned long

From: Matthew Wilcox

Date: Thu Mar 19 2026 - 13:07:59 EST


On Thu, Mar 19, 2026 at 04:03:23PM +0000, Brendan Jackman wrote:
> As pointed out by Vlastimil in [0], my proposal for __GFP_UNMAPPED is
> probably not needed for 32-bit. This offers a way out of the GFP flag
> scarcity so in preparation for this, flip gfp_t to be 64-bit on 64-bit
> machines, while leaving it 32-bit on 32-bit machines.

Ugh. This grows struct xarray:

struct xarray {
spinlock_t xa_lock;
/* private: The rest of the data structure is not to be used directly. */
gfp_t xa_flags;
void __rcu * xa_head;
};

which grows a lot of key data structures.

It would probably have been good for you to have run pahole before/after
this change and diff the results.

Now, you're probably saying "But this makes no damn sense, why on earth
is xa_flags of type gfp_t?" And the short answer is "because the radix
tree has a ridiculous API". But you'll learn all about it with your
new patch in this series which converts xa_flags from being gfp_t to a
plain unsigned int ;-)