[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aRhJk_Glv2pX2dRo@kernel.org>
Date: Sat, 15 Nov 2025 11:36:19 +0200
From: Mike Rapoport <rppt@...nel.org>
To: Pratyush Yadav <pratyush@...nel.org>
Cc: Pasha Tatashin <pasha.tatashin@...een.com>, akpm@...ux-foundation.org,
bhe@...hat.com, jasonmiu@...gle.com, arnd@...db.de, coxu@...hat.com,
dave@...ilevsky.ca, ebiggers@...gle.com, graf@...zon.com,
kees@...nel.org, linux-kernel@...r.kernel.org,
kexec@...ts.infradead.org, linux-mm@...ck.org
Subject: Re: [PATCH v1 04/13] kho: Verify deserialization status and fix FDT
alignment access
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.
Powered by blists - more mailing lists