On Fri, Nov 14, 2025 at 05:52:37PM +0100, Pratyush Yadav wrote:
> On Fri, Nov 14 2025, Pasha Tatashin wrote:
> 
> > @@ -1377,16 +1387,12 @@ static void __init kho_release_scratch(void)
> >  
> >  void __init kho_memory_init(void)
> >  {
> > -   struct folio *folio;
> > -
> >     if (kho_in.scratch_phys) {
> >             kho_scratch = phys_to_virt(kho_in.scratch_phys);
> >             kho_release_scratch();
> >  
> > -           kho_mem_deserialize(kho_get_fdt());
> > -           folio = kho_restore_folio(kho_in.fdt_phys);
> > -           if (!folio)
> > -                   pr_warn("failed to restore folio for KHO fdt\n");
> > +           if (!kho_mem_deserialize(kho_get_fdt()))
> > +                   kho_in.fdt_phys = 0;
> 
> The folio restore does serve a purpose: it accounts for that folio in
> the system's total memory. See the call to adjust_managed_page_count()
> in kho_restore_page(). In practice, I don't think it makes much of a
> difference, but I don't see why not.

This page is never freed, so adding it to zone managed pages or keeping it
reserved does not change anything.
 
> >     } else {
> >             kho_reserve_scratch();
> >     }
> 
> -- 
> Regards,
> Pratyush Yadav

-- 
Sincerely yours,
Mike.

Reply via email to