Re: [RFC PATCH 4/4] kho: Introduce kho_split_preserved_pages() helper

Mike Rapoport <[email protected]>
Newsgroups org.infradead.lists.kexec,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <178341290877.3292146.993563652569119942.b4-review@b4>
> A driver may need to split a high-order allocation that has already
> been preserved. If the pages are split using split_page() manually,

Why?
Are there particular examples?

> the refcounts would change but KHO won't record the change in the
> preserved page-type, resulting in a metadata mismatch during
> restoration in the new kernel.
> 
> Introduce kho_split_preserved_pages() to handle splitting of preserved
> pages. The helper follows an unpreserve -> split -> re-preserve sequence,
> while ensuring that the KHO radix tree is updated with the correct
> KHO_PAGE_SPLIT type bits.
> 
> The helper returns 0 on success, or a negative error code if the
> re-preservation fails. Callers must ensure the provided order matches
> the original allocation and that the operation is serialized against
> other preservation API calls.

Let's put this on hold until there are actual users.

-- 
Sincerely yours,
Mike.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.