From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Liu, Yuan1" <yuan1.liu@intel.com>,
Oscar Salvador <osalvador@suse.de>,
Mike Rapoport <rppt@kernel.org>,
Wei Yang <richard.weiyang@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"Hu, Yong" <yong.hu@intel.com>,
"Zou, Nanhai" <nanhai.zou@intel.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
"Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>,
"Chen, Yu C" <yu.c.chen@intel.com>,
"Deng, Pan" <pan.deng@intel.com>,
"Li, Tianyou" <tianyou.li@intel.com>,
Chen Zhang <zhangchen.kidd@jd.com>,
"Zeng, Jason" <jason.zeng@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 1/5] mm: move mirrored memory overlap checking to the outer loop
Date: Thu, 2 Jul 2026 15:19:55 +0200 [thread overview]
Message-ID: <1b6b2074-4575-4c54-a950-fda4b9154169@kernel.org> (raw)
In-Reply-To: <MW4PR11MB69365DA722268E4CF7C8D0CAA3EB2@MW4PR11MB6936.namprd11.prod.outlook.com>
On 6/26/26 10:26, Liu, Yuan1 wrote:
>
>> -----Original Message-----
>> From: David Hildenbrand (Arm) <david@kernel.org>
>> Sent: Thursday, June 25, 2026 8:05 PM
>> To: Liu, Yuan1 <yuan1.liu@intel.com>; Oscar Salvador <osalvador@suse.de>;
>> Mike Rapoport <rppt@kernel.org>; Wei Yang <richard.weiyang@gmail.com>
>> Cc: linux-mm@kvack.org; Hu, Yong <yong.hu@intel.com>; Zou, Nanhai
>> <nanhai.zou@intel.com>; Tim Chen <tim.c.chen@linux.intel.com>; Zhuo, Qiuxu
>> <qiuxu.zhuo@intel.com>; Chen, Yu C <yu.c.chen@intel.com>; Deng, Pan
>> <pan.deng@intel.com>; Li, Tianyou <tianyou.li@intel.com>; Chen Zhang
>> <zhangchen.kidd@jd.com>; Zeng, Jason <jason.zeng@intel.com>; linux-
>> kernel@vger.kernel.org
>> Subject: Re: [PATCH v5 1/5] mm: move mirrored memory overlap checking to
>> the outer loop
>>
>> On 5/20/26 11:34, Yuan Liu wrote:
>>> Move the overlap memmap initialization check from memmap_init_range()
>>> to memmap_init(), and replace the per-PFN check with a memblock-based
>>> check.
>>>
>>> Reviewed-by: Wei Yang <richard.weiyang@gmail.com>
>>> Reviewed-by: Jason Zeng <jason.zeng@intel.com>
>>> Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
>>> ---
>>
>> IIRC, with the patch from Mike+Wei this patch here should no longer be
>> required,
>> right?
>>
>> https://lore.kernel.org/r/20260625073941.145014-1-rppt@kernel.org
>
> Hi David
>
> Yes, we don't need the overlap-related patch anymore. The zone contiguity optimization will build on top of Mike's and Wei's changes, and I'll update the patches accordingly.
>
> These days I've been revisiting the issue where pages_with_online_memmap overcounts subsection hole pages in early sections.
>
> We previously attempted to address this with a patch [1], but I think the concern raised by Sashiko [2] is valid, so we may not be able to use patch [1].
>
> I can think of the following alternative approach, which can avoid changing semantics of pfn_valid() or first_valid_pfn():
>
> Basically we calculate pages_with_online_memmap by iterating over subsections in each zone during memmap_init(), to see pfn_to_online_page(start_pfn) is true or not.
> If it is true, then the whole subsection will be counted into pages_with_online_memmap.
We really should strive for a solution that doesn't walk any PFN ranges to
perform a pfn_to_online_page().
--
Cheers,
David
next prev parent reply other threads:[~2026-07-02 13:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 9:34 [PATCH v5 0/5] mm/memory_hotplug: optimize zone contiguous check when changing pfn range Yuan Liu
2026-05-20 9:34 ` [PATCH v5 1/5] mm: move mirrored memory overlap checking to the outer loop Yuan Liu
2026-05-21 3:33 ` Wei Yang
2026-05-22 7:43 ` Liu, Yuan1
2026-05-25 8:35 ` Wei Yang
2026-06-02 7:55 ` Liu, Yuan1
2026-06-12 2:44 ` Wei Yang
2026-06-25 12:04 ` David Hildenbrand (Arm)
2026-06-26 8:26 ` Liu, Yuan1
2026-07-02 13:19 ` David Hildenbrand (Arm) [this message]
2026-07-10 3:19 ` Liu, Yuan1
2026-05-20 9:34 ` [PATCH v5 2/5] mm: skip non-mirrored ZONE_NORMAL memory map init when kernelcore=mirror Yuan Liu
2026-05-20 9:34 ` [PATCH v5 3/5] mm: remove the special early-section handling from pfn_valid() and for_each_valid_pfn() Yuan Liu
2026-05-20 9:34 ` [PATCH v5 4/5] mm/memory_hotplug: optimize zone contiguous check when changing pfn range Yuan Liu
2026-05-20 9:34 ` [PATCH v5 5/5] mm/memory_hotplug: improve shrink_zone_span() subsection boundary checks Yuan Liu
2026-05-21 2:59 ` [PATCH v5 0/5] mm/memory_hotplug: optimize zone contiguous check when changing pfn range Wei Yang
2026-05-21 5:16 ` Liu, Yuan1
2026-06-01 7:17 ` Mike Rapoport
2026-06-02 7:37 ` Liu, Yuan1
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=1b6b2074-4575-4c54-a950-fda4b9154169@kernel.org \
--to=david@kernel.org \
--cc=jason.zeng@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nanhai.zou@intel.com \
--cc=osalvador@suse.de \
--cc=pan.deng@intel.com \
--cc=qiuxu.zhuo@intel.com \
--cc=richard.weiyang@gmail.com \
--cc=rppt@kernel.org \
--cc=tianyou.li@intel.com \
--cc=tim.c.chen@linux.intel.com \
--cc=yong.hu@intel.com \
--cc=yu.c.chen@intel.com \
--cc=yuan1.liu@intel.com \
--cc=zhangchen.kidd@jd.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
all inboxes | Powered by JetHome®