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

Samiullah Khawaja <[email protected]>
Newsgroups org.infradead.lists.kexec,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
On Tue, Jul 07, 2026 at 11:28:28AM +0300, Mike Rapoport wrote:
>> 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.

+1

I think we discussed in this in one of the hypervisor liveudpate meeting
sessions and it was concluded that the split of preseved pages is not
needed.
>
>-- 
>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.