> 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.


Reply via email to