linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/4] make vmalloc gfp flags usage more apparent
@ 2025-11-21  9:44 Vishal Moola (Oracle)
  2025-11-21  9:44 ` [PATCH v4 1/4] mm/vmalloc: warn on invalid vmalloc gfp flags Vishal Moola (Oracle)
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Vishal Moola (Oracle) @ 2025-11-21  9:44 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Uladzislau Rezki, Christoph Hellwig, linux-mm, linux-kernel,
	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 current mm-new.

v3 -> v4:
  - Add __GFP_NOLOCKDEP to the list of supported flags[1]
  - Replace WARN() with WARN_ONCE() to ratelimit warnings[2]
  - Collect some tags

Previous iterations are linked through v3[3].

[1] https://lore.kernel.org/linux-mm/20251121072945.GA30438@lst.de/T/#m7cd63a45d0cde563158ddde5ea54e46715e34381
[2] https://lore.kernel.org/mm-commits/20251119164452.0f763efbb282f71438a2964a@linux-foundation.org/T/#t
[3] https://lore.kernel.org/linux-mm/20251117173530.43293-1-vishal.moola@gmail.com/

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 | 50 ++++++++++++++++++++++++++++++++++++++++++--------
 1 file changed, 42 insertions(+), 8 deletions(-)

-- 
2.51.1



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

end of thread, other threads:[~2025-11-21  9:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-21  9:44 [PATCH v4 0/4] make vmalloc gfp flags usage more apparent Vishal Moola (Oracle)
2025-11-21  9:44 ` [PATCH v4 1/4] mm/vmalloc: warn on invalid vmalloc gfp flags Vishal Moola (Oracle)
2025-11-21  9:44 ` [PATCH v4 2/4] mm/vmalloc: Add a helper to optimize vmalloc allocation gfps Vishal Moola (Oracle)
2025-11-21  9:44 ` [PATCH v4 3/4] mm/vmalloc: cleanup large_gfp in vm_area_alloc_pages() Vishal Moola (Oracle)
2025-11-21  9:44 ` [PATCH v4 4/4] mm/vmalloc: cleanup gfp flag use in new_vmap_block() Vishal Moola (Oracle)

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