[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <mafs0ikfc5s02.fsf@kernel.org>
Date: Fri, 14 Nov 2025 20:33:17 +0100
From: Pratyush Yadav <pratyush@...nel.org>
To: Pasha Tatashin <pasha.tatashin@...een.com>
Cc: akpm@...ux-foundation.org, bhe@...hat.com, rppt@...nel.org,
jasonmiu@...gle.com, arnd@...db.de, coxu@...hat.com,
dave@...ilevsky.ca, ebiggers@...gle.com, graf@...zon.com,
kees@...nel.org, linux-kernel@...r.kernel.org,
kexec@...ts.infradead.org, linux-mm@...ck.org
Subject: Re: [PATCH v2 03/13] kho: Introduce high-level memory allocation API
On Fri, Nov 14 2025, Pasha Tatashin wrote:
> Currently, clients of KHO must manually allocate memory (e.g., via
> alloc_pages), calculate the page order, and explicitly call
> kho_preserve_folio(). Similarly, cleanup requires separate calls to
> unpreserve and free the memory.
>
> Introduce a high-level API to streamline this common pattern:
>
> - kho_alloc_preserve(size): Allocates physically contiguous, zeroed
> memory and immediately marks it for preservation.
> - kho_unpreserve_free(ptr): Unpreserves and frees the memory
> in the current kernel.
> - kho_restore_free(ptr): Restores the struct page state of
> preserved memory in the new kernel and immediately frees it to the
> page allocator.
>
> Signed-off-by: Pasha Tatashin <pasha.tatashin@...een.com>
> Reviewed-by: Mike Rapoport (Microsoft) <rppt@...nel.org>
Reviewed-by: Pratyush Yadav <pratyush@...nel.org>
[...]
--
Regards,
Pratyush Yadav
Powered by blists - more mailing lists