From: Brendan Jackman <jackmanb@google.com>
To: Matthew Wilcox <willy@infradead.org>,
Brendan Jackman <jackmanb@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Hocko <mhocko@suse.com>,
David Rientjes <rientjes@google.com>,
Shakeel Butt <shakeel.butt@linux.dev>,
Vlastimil Babka <vbabka@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Johannes Weiner <hannes@cmpxchg.org>, Zi Yan <ziy@nvidia.com>,
Harry Yoo <harry.yoo@oracle.com>, Hao Li <hao.li@linux.dev>,
Christoph Lameter <cl@gentwo.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Uladzislau Rezki <urezki@gmail.com>,
<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>
Subject: Re: [PATCH 0/5] mm: Switch gfp_t to unsigned long
Date: Thu, 19 Mar 2026 18:40:59 +0000 [thread overview]
Message-ID: <DH6Z95PTZYVF.3K64RCJC06GEJ@google.com> (raw)
In-Reply-To: <abwqq28hWXMLqa5P@casper.infradead.org>
On Thu Mar 19, 2026 at 4:56 PM UTC, Matthew Wilcox wrote:
> 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.
I will paste the diff at the bottom. I _think_ all the problematic
expansions are downstream of struct xarray, but it's quite likely my
sense for problematic struct expansions is weak.
> 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 ;-)
Hm... so Can We Just™ turn:
#define radix_tree_root xarray
... into ...
struct radix_tree_root {
struct xarray xarray;
gfp_t gfp;
};
...? Or do we actually need to find a way to keep the radix_tree_root
from growing too? If so, given that (IIUC?) the radix-tree API is soft
deprecated, I guess we can be pretty simple-minded about it and just
define a fixed set of the GFP flag values people use for this:
enum radix_tree_gfp {
RADIX_TREE_GFP_KERNEL,
...
RADIX_TREE_GFP_KERNEL_NOWARN,
};
const gfp_t radix_tree_gfps[] = {
[RADIX_TREE_GFP_KERNEL] = GFP_KERNEL,
...
[RADIX_TREE_GFP_KERNEL_NOWARN] = GFP_KERNEL | __GFP_NOWARN,
};
Would that make sense?
---
struct acpi_device_bus_id | +8
struct address_space | +16
struct amd_iommu_viommu | +16
struct auxiliary_device | +8
struct bdev_inode | +16
struct blkcg | +8
struct cgroup_subsys | +8
struct chain_allocator | +8
struct compact_control | +8
struct debugfs_inode_info | +16
struct dma_device | +8
struct dmar_domain | +8
struct drm_conn_prop_enum_list | +8
struct drm_device | +32
struct drm_file | +16
struct drm_i915_file_private | +24
struct drm_i915_gem_object | +24
struct drm_i915_private | +40
struct drm_master | +24
struct drm_mode_config | +24
struct dw_dma | +8
struct ethtool_netdev_state | +8
struct ext4_inode_info | +16
struct fsnotify_group | +8
struct gendisk | +8
struct hsu_dma | +8
struct hugetlbfs_inode_info | +16
struct i915_gem_context | +8
struct i915_gem_object_page_iter | +8
struct i915_perf | +8
struct ida | +8
struct idr | +8
struct ieee80211_if_nan | +8
struct ieee80211_local | +8
struct inet_connection_sock | +16
struct inet_sock | +16
struct inode | +16
struct inotify_group_private_data | +8
struct __intel_generic_device | +32
struct intel_gt | +24
struct intel_guc | +24
struct intel_iommu | +8
struct intel_uc | +24
struct iommufd_viommu | +8
struct iommu_group | +8
struct ipc_ids | +8
struct irq_domain | +8
struct iso_inode_info | +16
struct kernfs_root | +8
struct kmem_cache | +8
struct kvm | +32
struct kvm_arch | +24
struct kvm_mmu_memory_cache | +8
struct kvm_vcpu | +40
struct kvm_vcpu_arch | +40
struct loop_device | +8
struct mei_aux_device | +8
struct migration_target_control | +8
struct mqueue_inode_info | +16
struct msdos_inode_info | +16
struct msi_dev_domain | +8
struct msi_device_data | +8
struct net_devmem_dmabuf_binding | +8
struct netfs_inode | +16
struct netlink_sock | +16
struct nfs_inode | +16
struct nfs_net | +8
struct objpool_head | +8
struct oom_control | +8
struct p9_client | +16
struct partial_context | +8
struct phy_link_topology | +8
struct proc_inode | +16
struct protection_domain | +8
struct pts_fs_info | +8
struct raw6_sock | +64
struct regmap | +8
struct rethook | +8
struct rpc_inode | +16
struct sctp_sock | +16
struct serial_ctrl_device | +8
struct shmem_inode_info | +16
struct shrink_control | +8
struct snd_card | +16
struct sock | +16
struct swnode | +8
struct tcf_block | +8
struct tcf_idrinfo | +8
struct tcf_net | +8
struct tg3_dev_id | +4
struct thermal_zone_device | +8
struct trace_event_raw_dma_alloc_class | +8
struct trace_event_raw_dma_alloc_sgt | +8
struct tracefs_inode | +16
struct ttm_bo_swapout_walk | +8
struct v9fs_inode | +16
struct virtio_gpu_device | +16
struct virtio_pci_admin_vq | +8
struct virtio_pci_device | +8
struct vmap_block_queue | +8
struct worker_pool | +8
struct xarray | +8
struct xhci_stream_info | +8
next prev parent reply other threads:[~2026-03-19 18:41 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 16:03 [PATCH 0/5] mm: Switch gfp_t to unsigned long Brendan Jackman
2026-03-19 16:03 ` [PATCH 1/5] drm/managed: Use special gfp_t format specifier Brendan Jackman
2026-03-19 16:03 ` [PATCH 2/5] iwlegacy: 3945-mac: " Brendan Jackman
2026-03-19 16:03 ` [PATCH 3/5] mm/kfence: " Brendan Jackman
2026-03-19 16:03 ` [PATCH 4/5] net/rds: " Brendan Jackman
2026-03-19 16:03 ` [PATCH 5/5] mm: Change gfp_t to unsigned long Brendan Jackman
2026-03-22 13:25 ` kernel test robot
2026-03-22 15:39 ` kernel test robot
2026-03-22 18:47 ` kernel test robot
2026-03-19 16:56 ` [PATCH 0/5] mm: Switch " Matthew Wilcox
2026-03-19 18:40 ` Brendan Jackman [this message]
2026-03-19 21:39 ` Matthew Wilcox
2026-03-20 9:48 ` Brendan Jackman
2026-03-20 10:02 ` Vlastimil Babka (SUSE)
2026-03-20 13:22 ` Brendan Jackman
2026-03-19 17:03 ` Vlastimil Babka (SUSE)
2026-03-19 17:38 ` Brendan Jackman
2026-03-19 19:58 ` Vlastimil Babka (SUSE)
2026-03-20 9:56 ` Brendan Jackman
2026-03-19 18:30 ` Zi Yan
2026-03-20 9:37 ` Brendan Jackman
2026-03-20 16:26 ` Andrew Morton
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=DH6Z95PTZYVF.3K64RCJC06GEJ@google.com \
--to=jackmanb@google.com \
--cc=akpm@linux-foundation.org \
--cc=cl@gentwo.org \
--cc=hannes@cmpxchg.org \
--cc=hao.li@linux.dev \
--cc=harry.yoo@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=surenb@google.com \
--cc=urezki@gmail.com \
--cc=vbabka@kernel.org \
--cc=willy@infradead.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.