From: Mike Rapoport <rppt@kernel.org>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: Tianyou Li <tianyou.li@intel.com>,
Oscar Salvador <osalvador@suse.de>,
Wei Yang <richard.weiyang@gmail.com>,
Michal Hocko <mhocko@suse.com>,
linux-mm@kvack.org, Yong Hu <yong.hu@intel.com>,
Nanhai Zou <nanhai.zou@intel.com>, Yuan Liu <yuan1.liu@intel.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
Qiuxu Zhuo <qiuxu.zhuo@intel.com>,
Yu C Chen <yu.c.chen@intel.com>, Pan Deng <pan.deng@intel.com>,
Chen Zhang <zhangchen.kidd@jd.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 2/2] mm/memory hotplug/unplug: Optimize zone->contiguous update when changes pfn range
Date: Thu, 12 Feb 2026 10:32:18 +0200 [thread overview]
Message-ID: <aY2QEr-iYBukIkB-@kernel.org> (raw)
In-Reply-To: <b3777d0e-0b25-45bc-b387-e67fe5a0d328@kernel.org>
On Wed, Feb 11, 2026 at 01:19:56PM +0100, David Hildenbrand (Arm) wrote:
> > > *
> > > + * online_pages is pages within the zone that have an online memmap.
> > > + * online_pages include present pages and memory holes that have a
> > > + * memmap. When spanned_pages == online_pages, pfn_to_page() can be
> > > + * performed without further checks on any pfn within the zone span.
> >
> > Maybe pages_with_memmap? It would stand off from managed, spanned and
> > present, but it's clearer than online IMHO.
>
> offline pages also have a memmap, but that should not be touched as it might
> contain garbage. So it's a bit more tricky :)
Naming is hard :)
But I still think mentioning memmap there is useful :)
> Looking at set_zone_contiguous(), __pageblock_pfn_to_page() takes care of a
> weird case where the end of a zone falls into the middle of a pageblock.
>
> I am not even sure if that is possible
It's possible if a pageblock crosses node boundary. We also might add
VM_BUG_ON(pageblock_crosses_nodes(), "FIX YOUR FIRMWARE!") there ;-)
> but we could handle that easily in pageblock_pfn_to_page() by checking
> the requested range against the zone spanned range.
Agree.
> Then the semantics "zone->online_pages" would be less weird and more closely
> resemble "pages with online memmap".
>
> init_unavailable_range() might indeed do the trick!
>
> @Tianyou, can you explore that direction? I know, your PTO is coming up.
>
> --
> Cheers,
>
> David
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-02-12 8:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-30 16:37 [PATCH v9 0/2] Optimize zone->contiguous update Tianyou Li
2026-01-30 16:37 ` [PATCH v9 1/2] mm/memory hotplug/unplug: Add online_memory_block_pages() and offline_memory_block_pages() Tianyou Li
2026-01-30 16:37 ` [PATCH v9 2/2] mm/memory hotplug/unplug: Optimize zone->contiguous update when changes pfn range Tianyou Li
2026-02-07 11:00 ` David Hildenbrand (Arm)
2026-02-08 19:39 ` Mike Rapoport
2026-02-09 10:52 ` David Hildenbrand (Arm)
2026-02-09 12:44 ` David Hildenbrand (Arm)
2026-02-10 11:44 ` Mike Rapoport
2026-02-10 15:28 ` Li, Tianyou
2026-02-11 12:19 ` David Hildenbrand (Arm)
2026-02-12 8:32 ` Mike Rapoport [this message]
2026-02-12 8:45 ` David Hildenbrand (Arm)
2026-02-09 11:38 ` 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=aY2QEr-iYBukIkB-@kernel.org \
--to=rppt@kernel.org \
--cc=david@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--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=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