linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/4] make vmalloc gfp flags usage more apparent
@ 2025-11-03 19:04 Vishal Moola (Oracle)
  2025-11-03 19:04 ` [RFC PATCH v2 1/4] mm/vmalloc: warn on invalid vmalloc gfp flags Vishal Moola (Oracle)
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Vishal Moola (Oracle) @ 2025-11-03 19:04 UTC (permalink / raw)
  To: linux-kernel, linux-mm
  Cc: Uladzislau Rezki, Andrew Morton, Christoph Hellwig,
	Vishal Moola (Oracle)

We should do a better job at enforcing gfp flags for vmalloc. Right now, we
have a kernel-doc for __vmalloc_node_range(), and hope callers pass in
supported flags. If a caller were to pass in an unsupported flag, we may
BUG, silently clear it, or completely ignore it.

If we are more proactive about enforcing gfp flags, we can making sure
callers know when they may be asking for unsupported behavior.

This patchset lets vmalloc control the incoming gfp flags, and cleans up
some hard to read gfp code.

---
Based on mm-new.

v2:
  - Whitelist supported gfp flags instead of blacklisting the unsupported
  - Move the flags check up to the only exported functions that accept
    flags:
	__vmalloc_noprof() and vmalloc_huge_node_prof

Vishal Moola (Oracle) (4):
  mm/vmalloc: warn on invalid vmalloc gfp flags
  mm/vmalloc: Add a helper to optimize vmalloc allocation gfps
  mm/vmalloc: cleanup large_gfp in vm_area_alloc_pages()
  mm/vmalloc: cleanup gfp flag use in new_vmap_block()

 mm/vmalloc.c | 48 ++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 40 insertions(+), 8 deletions(-)

-- 
2.51.1



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

end of thread, other threads:[~2025-11-06 16:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-03 19:04 [RFC PATCH v2 0/4] make vmalloc gfp flags usage more apparent Vishal Moola (Oracle)
2025-11-03 19:04 ` [RFC PATCH v2 1/4] mm/vmalloc: warn on invalid vmalloc gfp flags Vishal Moola (Oracle)
2025-11-04 11:09   ` Christoph Hellwig
2025-11-04 16:28   ` Uladzislau Rezki
2025-11-05 13:16     ` Uladzislau Rezki
2025-11-06  0:00       ` Vishal Moola (Oracle)
2025-11-06 16:06         ` Uladzislau Rezki
2025-11-05 23:58     ` Vishal Moola (Oracle)
2025-11-06 16:11       ` Uladzislau Rezki
2025-11-03 19:04 ` [RFC PATCH v2 2/4] mm/vmalloc: Add a helper to optimize vmalloc allocation gfps Vishal Moola (Oracle)
2025-11-03 19:04 ` [RFC PATCH v2 3/4] mm/vmalloc: cleanup large_gfp in vm_area_alloc_pages() Vishal Moola (Oracle)
2025-11-03 19:04 ` [RFC PATCH v2 4/4] mm/vmalloc: cleanup gfp flag use in new_vmap_block() Vishal Moola (Oracle)
2025-11-04 16:30   ` Uladzislau Rezki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).