From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Liu, Yuan1" <yuan1.liu@intel.com>, Mike Rapoport <rppt@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>,
Wei Yang <richard.weiyang@gmail.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"Zou, Nanhai" <nanhai.zou@intel.com>,
Chen Zhang <zhangchen.kidd@jd.com>,
"Zeng, Jason" <jason.zeng@intel.com>,
"Chen, Yu C" <yu.c.chen@intel.com>,
"Deng, Pan" <pan.deng@intel.com>,
"Li, Tianyou" <tianyou.li@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v9 2/2] mm/memory_hotplug: optimize zone contiguous check when changing pfn range
Date: Fri, 18 Sep 2026 14:15:39 +0200 [thread overview]
Message-ID: <37e9fc88-4896-482f-bc6b-9023d4419783@kernel.org> (raw)
In-Reply-To: <PH7PR11MB69324C2F3079B23F8E20C489A3872@PH7PR11MB6932.namprd11.prod.outlook.com>
On 9/18/26 04:08, Liu, Yuan1 wrote:
>> -----Original Message-----
>> From: Mike Rapoport <rppt@kernel.org>
>> Sent: Wednesday, September 16, 2026 2:58 AM
>> To: David Hildenbrand (Arm) <david@kernel.org>
>> Cc: Liu, Yuan1 <yuan1.liu@intel.com>; Oscar Salvador <osalvador@suse.de>;
>> Wei Yang <richard.weiyang@gmail.com>; linux-mm@kvack.org; Zou, Nanhai
>> <nanhai.zou@intel.com>; Chen Zhang <zhangchen.kidd@jd.com>; Zeng, Jason
>> <jason.zeng@intel.com>; Chen, Yu C <yu.c.chen@intel.com>; Deng, Pan
>> <pan.deng@intel.com>; Li, Tianyou <tianyou.li@intel.com>; linux-
>> kernel@vger.kernel.org
>> Subject: Re: [PATCH v9 2/2] mm/memory_hotplug: optimize zone contiguous
>> check when changing pfn range
>>
>> On Tue, Sep 15, 2026 at 05:20:07PM +0200, David Hildenbrand (Arm) wrote:
>> a
>> pageblock
>> cost
>> pfn, int nid)
>> last
>> spfn,
>> section
>> However, only
>> online.
>>>
>>>
>>> Maybe extending that a bit we could do
>>>
>>> "With CONFIG_SPARSEMEM_VMEMMAP, early sections have a valid memmap for
>> all PFNs
>>> and the sections are marked online. However, we might have offline
>> subsections
>>> in such early sections, indicated by the subsection map. While we must
>>> initialize the entire valid memmap, account only the online pages
>> according to
>>> the subsection map as online (see pfn_to_online_page())."
>>
>> init_unavailable_range() already has large comment on top, adding
>> something
>> like that there makes perfect sense to me :)
>>
>> How about a bit different version:
>>
>> * The function counts pages that should be added to
>> * zone->pages_with_online_memmap.
>> * With CONFIG_SPARSEMEM_VMEMMAP there could be offline subsections even
>> though
>> * the entire memory map is valid and all the early sections are online.
>> * Count only pages in online subsections (see pfn_to_online_page()).
>
> Hi David
>
> Should I prepare and send a new version based on Mike's latest suggested changes?
Yes please. I guess this comment is the final bit before this should be good to go.
--
Cheers,
David
next prev parent reply other threads:[~2026-09-18 12:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-14 7:29 [PATCH v9 0/2] " Yuan Liu
2026-09-14 7:29 ` [PATCH v9 1/2] mm/memory_hotplug: make shrink_zone_span() more robust Yuan Liu
2026-09-14 7:29 ` [PATCH v9 2/2] mm/memory_hotplug: optimize zone contiguous check when changing pfn range Yuan Liu
2026-09-15 6:03 ` Mike Rapoport
2026-09-15 10:40 ` Liu, Yuan1
2026-09-15 12:52 ` Mike Rapoport
2026-09-15 15:20 ` David Hildenbrand (Arm)
2026-09-15 18:58 ` Mike Rapoport
2026-09-18 2:08 ` Liu, Yuan1
2026-09-18 12:15 ` David Hildenbrand (Arm) [this message]
2026-09-14 10:45 ` [PATCH v9 0/2] " David Hildenbrand (Arm)
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=37e9fc88-4896-482f-bc6b-9023d4419783@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=richard.weiyang@gmail.com \
--cc=rppt@kernel.org \
--cc=tianyou.li@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®