Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Wei Yang <richard.weiyang@gmail.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@kernel.org>,
	Taku Izumi <izumi.taku@jp.fujitsu.com>,
	Yuan Liu <yuan1.liu@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/mm_init: drop overlap_memmap_init()
Date: Mon, 29 Jun 2026 14:48:28 +0300	[thread overview]
Message-ID: <akJbjA-_ZeGGJKHC@kernel.org> (raw)
In-Reply-To: <20260626092952.qoihjgphv43ezw6v@master>

On Fri, Jun 26, 2026 at 09:29:52AM +0000, Wei Yang wrote:
> On Fri, Jun 26, 2026 at 10:40:32AM +0300, Mike Rapoport wrote:
> >Hi Wei,
> >
> >On Thu, Jun 25, 2026 at 09:58:47AM +0000, Wei Yang wrote:
> >> On Thu, Jun 25, 2026 at 10:39:40AM +0300, Mike Rapoport wrote:
> >> >From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
> >> >
> >> >When ZONE_NORMAL and ZONE_MOVABLE could overlap because kernelcore=mirror
> >> >didn't reduce the span of ZONE_NORMAL, initialization of the memory map had
> >> >to skip overlapping pages during initialization of ZONE_MOVABLE to avoid
> >> >double initialization of the same struct pages.
> >> >
> >> >Since kernelcore=mirror works now the same way as other variants of
> >> >kernelcore=/movablecore=, and adjusts the span of ZONE_NORMAL, there can't
> >> >be an overlap between ZONE_NORMAL and ZONE_MOVABLE.
> >> >
> >> >Remove overlap_memmap_init().
> >> >
> >> 
> >> Do you think this is valuable to mention the double init for the overlapped
> >> range?
> >
> >Not sure I follow.
> >We had this weird overlap_memmap_init() exactly to avoid double init.
> > 
> 
> Yes, this is really weird.
> 
> As I described the detail in [1], before this change kernel would have
> overlapped zone range like:
> 
>   Normal  [100000, 1c0000]
>   Movable [140000, 1c0000]
> 
> Which means [140000, 1c0000] belongs to both Normal and Movable.
> And memmap_init_range() would be called on this range twice for Normal and
> Movable respectively. And we want overlap_memmap_init() could skip init this
> to Normal. Because actually, the memory in this range belongs to Movable Zone.
> 
> But overlap_memmap_init() only would skip for Zone Movable. This means when
> init to Zone Normal, it doesn't skip as we want. And when init to Zone
> Movable, we don't expect it to skip.

I'll add something along these lines into the cover letter and will merge
it as a merge commit.

Will send v2 soon.
 
> [1]: https://lore.kernel.org/linux-mm/20260623092351.13031-3-richard.weiyang@gmail.com/
> 
> -- 
> Wei Yang
> Help you, Help me

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2026-06-29 11:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25  7:39 [PATCH 0/2] mm/mm_init: don't overlap zones with kernelcore=mirror Mike Rapoport
2026-06-25  7:39 ` [PATCH 1/2] mm/mm_init: don't overlap NORMAL and MOVABLE " Mike Rapoport
2026-06-25 10:42   ` David Hildenbrand (Arm)
2026-06-25  7:39 ` [PATCH 2/2] mm/mm_init: drop overlap_memmap_init() Mike Rapoport
2026-06-25  9:58   ` Wei Yang
2026-06-26  7:40     ` Mike Rapoport
2026-06-26  9:29       ` Wei Yang
2026-06-29 11:48         ` Mike Rapoport [this message]
2026-06-25 10:43   ` David Hildenbrand (Arm)
2026-06-26  8:11 ` [PATCH 0/2] mm/mm_init: don't overlap zones with kernelcore=mirror 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=akJbjA-_ZeGGJKHC@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=izumi.taku@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=richard.weiyang@gmail.com \
    --cc=yuan1.liu@intel.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