[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1df9b8da-6462-41ec-9dc5-df99dbd8ae8b@redhat.com>
Date: Tue, 19 Aug 2025 14:31:05 +0200
From: David Hildenbrand <david@...hat.com>
To: Mike Rapoport <rppt@...nel.org>, Wei Yang <richard.weiyang@...il.com>
Cc: 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 19.08.25 12:39, Mike Rapoport wrote:
> 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.
Thanks, my memory comes back :)
Reviewed-by: David Hildenbrand <david@...hat.com>
--
Cheers
David / dhildenb
Powered by blists - more mailing lists