Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Mike Rapoport <rppt@kernel.org>, Yuan Liu <yuan1.liu@intel.com>
Cc: Oscar Salvador <osalvador@suse.de>,
	Wei Yang <richard.weiyang@gmail.com>,
	linux-mm@kvack.org, Nanhai Zou <nanhai.zou@intel.com>,
	Chen Zhang <zhangchen.kidd@jd.com>,
	Jason Zeng <jason.zeng@intel.com>, Chen Yu <yu.c.chen@intel.com>,
	Pan Deng <pan.deng@intel.com>, Tianyou Li <tianyou.li@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 2/2] mm/memory_hotplug: optimize zone contiguous check when changing pfn range
Date: Wed, 19 Aug 2026 17:43:31 +0200	[thread overview]
Message-ID: <dfdacdac-fa1d-47c3-8d22-abdbd8c43ab8@kernel.org> (raw)
In-Reply-To: <aoXEBCWQ-a9OB_YE@kernel.org>

On 8/19/26 16:56, Mike Rapoport wrote:
> On Tue, Aug 18, 2026 at 04:57:02AM -0400, Yuan Liu wrote:
>> When move_pfn_range_to_zone() or remove_pfn_range_from_zone() updates a
>> zone, set_zone_contiguous() rescans the entire zone pageblock-by-pageblock
>> to rebuild zone->contiguous. For large zones this is a significant cost
>> during memory hotplug and hot-unplug.
>>
>> Add a new zone member, pages_with_online_memmap, that tracks the
>> number of pages within the zone span that have an online memory map,
>> including present pages and memory holes whose memory map has been
>> initialized and for which pfn_to_online_page() succeeds.
>>
>> For early boot memory, pages_with_online_memmap is calculated in
>> memmap_init_zone_range(). PFNs initialized by memmap_init_range() are
>> included in pages_with_online_memmap, and hole PFNs for which
>> pfn_to_online_page() succeeds are also counted in
>> init_unavailable_range().
> 
> In what scenario it is possible that pfn_to_online_page() would fail at
> that point?
pfn_to_online_page()==false even though pfn_valid()==true in case we have a
subsection-sized hole in an early section.

-- 
Cheers,

David


  reply	other threads:[~2026-08-19 15:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-18  8:57 [PATCH v7 0/2] mm/memory_hotplug: optimize zone contiguous check when changing pfn range Yuan Liu
2026-08-18  8:57 ` [PATCH v7 1/2] mm/memory_hotplug: make shrink_zone_span() more robust Yuan Liu
2026-08-18  8:57 ` [PATCH v7 2/2] mm/memory_hotplug: optimize zone contiguous check when changing pfn range Yuan Liu
2026-08-19 14:56   ` Mike Rapoport
2026-08-19 15:43     ` David Hildenbrand (Arm) [this message]
2026-08-19 15:53   ` 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=dfdacdac-fa1d-47c3-8d22-abdbd8c43ab8@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