From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9A9973FA5E5 for ; Mon, 29 Jun 2026 11:48:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782733715; cv=none; b=PIlJGWPb1stO0wtM9fRrqVA/y4d4gDWaOPoYI6Rpyl7xPcKnJjyIkGft4RqHuqb2xQoGmn1jWCtmfDrnFP825ZBzf5ydpAx8JD91uFvj2xJBi1fVBt37QSxsbJnMfbMRgo4XB2WPTwt/+uqdyAu6n5hbVRrRHV8TDLAF/pYm0EI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782733715; c=relaxed/simple; bh=9XiE9ZLKjcq0cxNsZ/Uz6W53TUff3YhYn4KTr0qZPWc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ajCoxts32rFC4ADf3abSdUs6c8pKPDdCRWyJVbUjBnRale3+MJF0oFtgRuqIkihy2MkZrOvdjVR2HjNXd3/KzsdYQP42DwZu+gPsVzymrkCAg6T74IUnAiPPrQR9GVl7TxSucP0aAd0YDR3H2X4pW2Q5dS5+7GVszAGO6FiQ3VQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H65gbf2i; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H65gbf2i" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EA2E21F000E9; Mon, 29 Jun 2026 11:48:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782733714; bh=WdJjBapnWqK/5wc19D0+FvXlEWJ7CMzxx57KUogxdVo=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=H65gbf2iEGv2XZKo4se061BH3bpHpe3VUjVrcnH1e+nvvMAQO8XAvhKSS1QlzRZj/ Xuf1p9OvYpjwTNrVOHuRn76V/YYYj7Ma7qMir7f49NfjE/PsXgWBuBnPntta+oizSu IJQtP0EFsaHz8PDDj3NYWZ4e09Ec2QXBZbsnRvDSm3knw6q/ZaB4s6547BwB2e/p+Y BsqkzdIscaS0Sef0dyM67Pv66p53nbpBoqUhBVJk23R8kRQjAfWRoEqS8jrHGFt0Dt ya3hvDQVXDeh3pkiuW6MyJqSxzt0hN6M3/lEuWBIE1avqqnJAW9wOLw7FET6ICk+jb 3laaHp7g0kQNA== Date: Mon, 29 Jun 2026 14:48:28 +0300 From: Mike Rapoport To: Wei Yang Cc: linux-mm@kvack.org, Andrew Morton , David Hildenbrand , Taku Izumi , Yuan Liu , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] mm/mm_init: drop overlap_memmap_init() Message-ID: References: <20260625073941.145014-1-rppt@kernel.org> <20260625073941.145014-3-rppt@kernel.org> <20260625095846.4e2tl3fbduc24erg@master> <20260626092952.qoihjgphv43ezw6v@master> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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)" > >> > > >> >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.