public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] mm: Switch gfp_t to unsigned long
@ 2026-03-19 16:03 Brendan Jackman
  2026-03-19 16:03 ` [PATCH 1/5] drm/managed: Use special gfp_t format specifier Brendan Jackman
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: Brendan Jackman @ 2026-03-19 16:03 UTC (permalink / raw)
  To: Andrew Morton, Michal Hocko, David Rientjes, Shakeel Butt,
	Vlastimil Babka, Suren Baghdasaryan, Brendan Jackman,
	Johannes Weiner, Zi Yan, Harry Yoo, Hao Li, Christoph Lameter,
	Roman Gushchin, Uladzislau Rezki
  Cc: linux-kernel, linux-mm

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.

For mm-internal code that prints raw GFP flags as hex, this just updates
the format specifier to %lx. Presumably developers have a reason for
wanting to see the whole flags word as a number in the log. For printks
outside of mm/, I assume they are only using %x because the authors
didn't know about %pGg, so they are converted to the latter as prep
patches.

Stuff I've done to try and find issues with this:

- Built x86 allmodconfig and arm64 defconfig. Hopefully the 0-day bot
  will alert me to the important builds I'm missing (I briefly tried to
  build s390 and sparc64 but ran into tooling issues and gave up).

- Ran some selftests on a x86 VM.

- Poked around at stuff that refers to ___GFP_LAST_BIT to see if
  anything looks wrong.

- Ran this Coccinelle script to look for explicit casts to plain int:

---
virtual report

@r@
gfp_t x;
position p;
@@

(
  (unsigned int)x@p
|
  (int)x@p
)

@script:python depends on report@
p << r.p;
@@
msg = "WARNING: Explicit integer cast of gfp_t"
coccilib.report.print_report(p[0], msg)
---

Obviously this series doesn't "do anything" so maybe it doesn't make
sense to merge it unless it goes in alongside __GFP_UNMAPPED, but it
does seem to make sense to review it independently so I'm posting it as
a separate series.

[0] https://lore.kernel.org/all/6206d021-e6c2-4899-b426-cacd71ebd5ef@kernel.org/

To: Andrew Morton <akpm@linux-foundation.org>
To: Michal Hocko <mhocko@suse.com>
To: David Rientjes <rientjes@google.com>
To: Shakeel Butt <shakeel.butt@linux.dev>
To: Vlastimil Babka <vbabka@kernel.org>
To: Suren Baghdasaryan <surenb@google.com>
To: Brendan Jackman <jackmanb@google.com>
To: Johannes Weiner <hannes@cmpxchg.org>
To: Zi Yan <ziy@nvidia.com>
To: Harry Yoo <harry.yoo@oracle.com>
To: Hao Li <hao.li@linux.dev>
To: Christoph Lameter <cl@gentwo.org>
To: Roman Gushchin <roman.gushchin@linux.dev>
To: Uladzislau Rezki <urezki@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org

Signed-off-by: Brendan Jackman <jackmanb@google.com>

---
Brendan Jackman (5):
      drm/managed: Use special gfp_t format specifier
      iwlegacy: 3945-mac: Use special gfp_t format specifier
      mm/kfence: Use special gfp_t format specifier
      net/rds: Use special gfp_t format specifier
      mm: Change gfp_t to unsigned long

 drivers/gpu/drm/drm_managed.c                  | 4 ++--
 drivers/net/wireless/intel/iwlegacy/3945-mac.c | 4 ++--
 include/linux/types.h                          | 2 +-
 lib/test_lockup.c                              | 2 +-
 mm/kfence/kfence_test.c                        | 2 +-
 mm/oom_kill.c                                  | 2 +-
 mm/page_alloc.c                                | 5 ++++-
 mm/page_owner.c                                | 4 ++--
 mm/slab_common.c                               | 2 +-
 mm/slub.c                                      | 2 +-
 mm/vmalloc.c                                   | 2 +-
 net/rds/tcp_recv.c                             | 2 +-
 12 files changed, 18 insertions(+), 15 deletions(-)
---
base-commit: 8a30aeb0d1b4e4aaf7f7bae72f20f2ae75385ccb
change-id: 20260319-gfp64-7a970a80ba4e

Best regards,
-- 
Brendan Jackman <jackmanb@google.com>


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2026-03-22 18:49 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox