Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
* revisiting alloc_pages_bulks semantics?
@ 2026-05-27  7:18 Christoph Hellwig
  2026-05-27  7:53 ` Zi Yan
  2026-05-27 10:06 ` Vlastimil Babka (SUSE)
  0 siblings, 2 replies; 11+ messages in thread
From: Christoph Hellwig @ 2026-05-27  7:18 UTC (permalink / raw)
  To: Andrew Morton, Vlastimil Babka, Suren Baghdasaryan, Michal Hocko,
	Brendan Jackman, Johannes Weiner, Zi Yan, Chuck Lever,
	Matthew Wilcox (Oracle), linux-nfs, linux-mm, linux-kernel

Hi all,

I've been looking into using alloc_pages_bulks in a few places lately,
and have run into issues with the API.  Here is my suggestions for how
to make this more useful, although only some of them are something
I'd feel comfortable to do myself:

1) early fail semantics

alloc_pages_bulks can do partial allocations for some reasons, and
users usually have a fallback by either looping and calling it again
or falling back to single page allocations.  This sucks!  Why can't
we get our usual try as hard as you can semantics, requiring
GFP_NORETRY or similar to relax it?

2) pre-zeroed page array 

There is one single user (svc_fill_pages in sunrpc) that relies on it.
For everyone else it creates extra burden and is very error prone
(speaking from experience).

3) page instead of folio

We're allocating folios, so we should have a folio API.

4) > order 0 support

The bulk allocator is limited to order 0 which limits it's usefulness
these days.  It would be really helpful to do bulk allocations for
the pagecache or bounce buffering.


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

end of thread, other threads:[~2026-05-28 13:17 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-27  7:18 revisiting alloc_pages_bulks semantics? Christoph Hellwig
2026-05-27  7:53 ` Zi Yan
2026-05-27  8:00   ` Christoph Hellwig
2026-05-27  8:31     ` Zi Yan
2026-05-27 12:15       ` Christoph Hellwig
2026-05-27 10:06 ` Vlastimil Babka (SUSE)
2026-05-27 12:19   ` Christoph Hellwig
2026-05-27 13:23     ` Matthew Wilcox
2026-05-27 13:58     ` Chuck Lever
2026-05-28  9:00       ` Christoph Hellwig
2026-05-28 13:16         ` Chuck Lever

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