Re: [PATCH 1/5] RDMA/umem: ib_umem_get(): use kmalloc() to allocate page array
From: Jason Gunthorpe
Date: Thu Jul 02 2026 - 08:56:47 EST
On Thu, Jul 02, 2026 at 02:46:46PM +0200, Vlastimil Babka (SUSE) wrote:
> I think this should be discussed more broadly and not block this
> change.
Currently all of these get_free_pages ones in this series are this
special need, so I'd like to not loose that marking somehow. Maybe a
comment or maybe a inline wrapper function.
> Instead of adding just kmalloc_temporary() we should look at the bigger
> picture where we have manual optimistic nowait attempts with smaller
> fallbacks. Willy's LSF/MM plenary touched on this, as well as recent threads
> with Dave Chinner [1] etc.
Yeah, there is a bigger thing here.
> With that said, I'm for example not sure if "_temporary()" is really the
> distinguishing characteristic for this to be part of the name.
It is the main characteristic of the specific workflow I am pointing at:
- Allocation is a short term temporary buffer to run some algorithm
- Performance trade off is larger memory = faster algorithm
- Sleeping, reclaim, etc is going to be slower than just using a
PAGE_SIZE buffer
- Must be contiguous
IMHO I don't mind labeling these specific things with a specific
function, even if there is a more general function also.
> [1] https://lore.kernel.org/all/1f50ce04-20e6-46a0-9d8a-00a5f7a74967@xxxxxxxx/
Like this is a different workflow than the temporary one, you may want
to do a little more work to try to get larger pages since they will be
in use for a long time.
Jason