[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aKRUUzq48xW5qPOp@kernel.org>
Date: Tue, 19 Aug 2025 13:39:15 +0300
From: Mike Rapoport <rppt@...nel.org>
To: Wei Yang <richard.weiyang@...il.com>
Cc: David Hildenbrand <david@...hat.com>, linux-mm@...ck.org,
Andrew Morton <akpm@...ux-foundation.org>,
Bill Wendling <morbo@...gle.com>,
Daniel Jordan <daniel.m.jordan@...cle.com>,
Justin Stitt <justinstitt@...gle.com>,
Michael Ellerman <mpe@...erman.id.au>,
Miguel Ojeda <ojeda@...nel.org>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <nick.desaulniers+lkml@...il.com>,
linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH 3/4] mm/mm_init: drop deferred_init_maxorder()
On Tue, Aug 19, 2025 at 09:22:54AM +0000, Wei Yang wrote:
> On Tue, Aug 19, 2025 at 09:54:22AM +0200, David Hildenbrand wrote:
> >> -static unsigned long __init
> >> -deferred_init_memmap_chunk(unsigned long start_pfn, unsigned long end_pfn,
> >> - struct zone *zone)
> >> -{
> >> - unsigned long nr_pages = 0;
> >> - unsigned long spfn, epfn;
> >> - u64 i = 0;
> >> + while (spfn < epfn) {
> >> + unsigned long mo_pfn = ALIGN(spfn + 1, MAX_ORDER_NR_PAGES);
> >> + unsigned long chunk_end = min(mo_pfn, epfn);
> >> - deferred_init_mem_pfn_range_in_zone(&i, zone, &spfn, &epfn, start_pfn);
> >> + nr_pages += deferred_init_pages(zone, spfn, chunk_end);
> >> + deferred_free_pages(spfn, chunk_end - spfn);
> >
> >
> >I assume the expectation is that all PFNs in the start_pfn -> end_pfn range
> >will go to this zone, correct?
>
> I think so.
>
> defer_init only apply to the highest zone in one node.
Right, we defer initialization of last zone in every node and there is a
thread per node that does the initialization.
--
Sincerely yours,
Mike.
Powered by blists - more mailing lists