Thread (137 messages) 137 messages, 11 authors, 2025-10-09

Re: [PATCH v3 07/30] kho: add interfaces to unpreserve folios and physical memory ranges

From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2025-08-18 13:55:14
Also in: linux-api, linux-fsdevel, linux-mm, lkml

On Fri, Aug 15, 2025 at 12:12:10PM +0300, Mike Rapoport wrote:
quoted
Which is perhaps another comment, if this __get_free_pages() is going
to be a common pattern (and I guess it will be) then the API should be
streamlined alot more:

 void *kho_alloc_preserved_memory(gfp, size);
 void kho_free_preserved_memory(void *);
This looks backwards to me. KHO should not deal with memory allocation,
it's responsibility to preserve/restore memory objects it supports.
Then maybe those are luo_ helpers

But having users open code __get_free_pages() and convert to/from
struct page, phys, etc is not a great idea.

The use case is simply to get some memory to preserve, it should work
in terms of void *. We don't support slab today so this has to be
emulated with full pages, but this detail should not leak out of the
API.

Jason
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help