mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/6] mm: pass alloc_flags through folio, filemap, and bulk allocators
@ 2026-09-23 21:10 Gregory Price
  2026-09-23 21:10 ` [RFC PATCH 1/6] mm/page_alloc: clarify bulk allocator flag scope Gregory Price
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Gregory Price @ 2026-09-23 21:10 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, linux-fsdevel, kernel-team, willy, jack, akpm,
	david, gourry, ziy, joshua.hahnjy, rakie.kim, ying.huang, vbabka,
	surenb, mhocko, brendan.jackman, hannes

The folio, filemap, and bulk allocation interfaces currently hard-code
ALLOC_DEFAULT before reaching the page allocator. Multiple MM series
need to select allocator behavior through these paths, so pulling these
changes out ahead helps both series avoid conflicts.

This six-patch series first separates allocator behavior flags from
the bulk allocator fast-path flags and shares their validation and
preparation. It then passes alloc_flags through the MM-internal folio,
NUMA policy, filemap, and bulk helpers.

The existing exported folio, node, filemap, and bulk interfaces remain
ALLOC_DEFAULT wrappers.

Non-task ALLOC_NOLOCK folio allocations bypass task mempolicy and
cpuset-spread selection because those paths are not safe in all
interrupt contexts.

Existing callers retain their current behavior.

The allocator changes were built for x86-64 with DEBUG_VM,
DEBUG_VM_PGFLAGS, DEBUG_PAGEALLOC, PAGE_OWNER, PAGE_TABLE_CHECK,
PROVE_LOCKING, DEBUG_ATOMIC_SLEEP, and memory allocation profiling enabled.

Testing under virtme-ng/QEMU used a four-CPU guest:

- test_vmalloc vm_map_ram passed 50/50 64-page batches and 100/100 one-page
  fallbacks.
- With page_owner=on, all 25 runs produced the expected partial batch because
  page owner deliberately uses the one-page fallback.
- The alloc_tag ioctl selftest passed 4/4 tests.
- The migration selftest passed 6/6 tests.
- The page-fragment smoke, aligned, and nonaligned tests passed 3/3.
- khugepaged -s 2 passed 22 non-swap tests. Its four swap-dependent tests
  reported failure because the guest had no swap configured.

No BUG, WARNING, lockdep, or atomic-sleep diagnostics were reported.

Cc: Vlastimil Babka <vbabka@kernel.org>

Brendan Jackman (3):
  mm/page_alloc: add an alloc_flags-aware folio allocator
  mm/mempolicy: plumb alloc_flags through folio allocation
  mm/filemap: plumb alloc_flags through folio allocation

Gregory Price (3):
  mm/page_alloc: clarify bulk allocator flag scope
  mm/page_alloc: refactor alloc_flags preparation
  mm/page_alloc: let the bulk allocator carry alloc_flags

 mm/filemap.c    |  45 ++++++++--
 mm/mempolicy.c  |  44 +++++++---
 mm/mempolicy.h  |  28 +++++++
 mm/page_alloc.c | 217 ++++++++++++++++++++++++++++--------------------
 mm/page_alloc.h |  10 +++
 5 files changed, 236 insertions(+), 108 deletions(-)
 create mode 100644 mm/mempolicy.h

-- 
2.55.0


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

end of thread, other threads:[~2026-09-23 22:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 21:10 [RFC PATCH 0/6] mm: pass alloc_flags through folio, filemap, and bulk allocators Gregory Price
2026-09-23 21:10 ` [RFC PATCH 1/6] mm/page_alloc: clarify bulk allocator flag scope Gregory Price
2026-09-23 21:10 ` [RFC PATCH 2/6] mm/page_alloc: refactor alloc_flags preparation Gregory Price
2026-09-23 21:10 ` [RFC PATCH 3/6] mm/page_alloc: add an alloc_flags-aware folio allocator Gregory Price
2026-09-23 21:10 ` [RFC PATCH 4/6] mm/mempolicy: plumb alloc_flags through folio allocation Gregory Price
2026-09-23 21:10 ` [RFC PATCH 5/6] mm/filemap: " Gregory Price
2026-09-23 21:10 ` [RFC PATCH 6/6] mm/page_alloc: let the bulk allocator carry alloc_flags Gregory Price
2026-09-23 21:42 ` [RFC PATCH 0/6] mm: pass alloc_flags through folio, filemap, and bulk allocators Matthew Wilcox
2026-09-23 22:09   ` Gregory Price

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

all inboxes | Powered by JetHome®