From: Mike Rapoport <rppt@kernel.org>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: David Hildenbrand <david@redhat.com>,
linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Bill Wendling <morbo@google.com>,
Daniel Jordan <daniel.m.jordan@oracle.com>,
Justin Stitt <justinstitt@google.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Miguel Ojeda <ojeda@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH 3/4] mm/mm_init: drop deferred_init_maxorder()
Date: Tue, 19 Aug 2025 13:39:15 +0300 [thread overview]
Message-ID: <aKRUUzq48xW5qPOp@kernel.org> (raw)
In-Reply-To: <20250819092254.cddlg6npwl75fvbn@master>
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.
next prev parent reply other threads:[~2025-08-19 10:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 6:46 [PATCH 0/4] mm/mm_init: simplify deferred init of struct pages Mike Rapoport
2025-08-18 6:46 ` [PATCH 1/4] mm/mm_init: use deferred_init_memmap_chunk() in deferred_grow_zone() Mike Rapoport
2025-08-19 7:44 ` David Hildenbrand
2025-08-19 9:52 ` Wei Yang
2025-08-19 10:54 ` Mike Rapoport
2025-08-19 23:51 ` Wei Yang
2025-08-20 9:20 ` Mike Rapoport
2025-08-20 12:42 ` Wei Yang
2025-08-18 6:46 ` [PATCH 2/4] mm/mm_init: deferred_init_memmap: use a job per zone Mike Rapoport
2025-08-19 7:45 ` David Hildenbrand
2025-08-18 6:46 ` [PATCH 3/4] mm/mm_init: drop deferred_init_maxorder() Mike Rapoport
2025-08-19 7:54 ` David Hildenbrand
2025-08-19 9:22 ` Wei Yang
2025-08-19 10:39 ` Mike Rapoport [this message]
2025-08-19 12:31 ` David Hildenbrand
2025-08-18 6:46 ` [PATCH 4/4] memblock: drop for_each_free_mem_pfn_range_in_zone_from() Mike Rapoport
2025-08-19 7:39 ` [PATCH 0/4] mm/mm_init: simplify deferred init of struct pages Wei Yang
2025-08-19 10:41 ` Mike Rapoport
2025-08-22 5:54 ` Mike Rapoport
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aKRUUzq48xW5qPOp@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=daniel.m.jordan@oracle.com \
--cc=david@redhat.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
--cc=ojeda@kernel.org \
--cc=richard.weiyang@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).