[PATCH v7 2/3] kho: fix deferred init of kho scratch
Mike Rapoport
rppt at kernel.org
Wed Mar 18 04:02:49 PDT 2026
On Wed, Mar 18, 2026 at 11:33:09AM +0100, Michał Cłapiński wrote:
> On Wed, Mar 18, 2026 at 10:33 AM Mike Rapoport <rppt at kernel.org> wrote:
> > > @@ -1500,8 +1502,8 @@ static void __init kho_release_scratch(void)
> > > void __init kho_memory_init(void)
> > > {
> > > if (kho_in.scratch_phys) {
> > > - kho_scratch = phys_to_virt(kho_in.scratch_phys);
> > > kho_release_scratch();
> > > + kho_scratch = phys_to_virt(kho_in.scratch_phys);
> >
> > Why this change is needed?
>
> It's not necessary but kho_release_scratch() will call
> kho_scratch_overlap(). If kho_scratch is NULL, kho_scratch_overlap()
> will return early, making it slightly faster. Alternatively, I skip
> invoking kho_scratch_overlap() if migratetype is already MIGRATE_CMA.
> (resending this since the last email was html)
Thanks for the explanation.
Let's keep the change and add a sentence about it to the changelog.
--
Sincerely yours,
Mike.
More information about the kexec
mailing list