[PATCH v9 1/3] kho: fix deferred initialization of scratch areas

Pratyush Yadav pratyush at kernel.org
Thu Apr 23 09:43:04 PDT 2026


On Thu, Apr 23 2026, Michal Clapinski wrote:

> Currently, if CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled,
> kho_release_scratch() will initialize the struct pages and set migratetype
> of KHO scratch. Unless the whole scratch fits below first_deferred_pfn,
> some of that will be overwritten either by deferred_init_pages() or
> memmap_init_reserved_range().
>
> To fix it, make memmap_init_range(), deferred_init_memmap_chunk() and
> __init_page_from_nid() recognize KHO scratch regions and set
> migratetype of pageblocks in those regions to MIGRATE_CMA.
>
> Co-developed-by: Mike Rapoport (Microsoft) <rppt at kernel.org>
> Signed-off-by: Mike Rapoport (Microsoft) <rppt at kernel.org>
> Signed-off-by: Michal Clapinski <mclapinski at google.com>

Reviewed-by: Pratyush Yadav (Google) <pratyush at kernel.org>

[...]

-- 
Regards,
Pratyush Yadav



More information about the kexec mailing list