From: Mike Rapoport <rppt@kernel.org>
To: "Li, Tianyou" <tianyou.li@intel.com>
Cc: David Hildenbrand <david@kernel.org>,
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 v8 1/3] mm/memory hotplug: Fix zone->contiguous always false when hotplug
Date: Tue, 27 Jan 2026 08:53:26 +0200 [thread overview]
Message-ID: <aXhg5k_iAwzQr8Wa@kernel.org> (raw)
In-Reply-To: <804139fd-e210-4387-9a63-ac76f4df66c7@intel.com>
Hi,
On Sat, Jan 24, 2026 at 08:18:39PM +0800, Li, Tianyou wrote:
> On 1/22/2026 7:16 PM, Mike Rapoport wrote:
> > On Tue, Jan 20, 2026 at 10:33:44PM +0800, Tianyou Li wrote:
> > > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> > > index a63ec679d861..c8f492b5daf0 100644
> > > --- a/mm/memory_hotplug.c
> > > +++ b/mm/memory_hotplug.c
> > > @@ -782,8 +782,6 @@ void move_pfn_range_to_zone(struct zone *zone, unsigned long start_pfn,
> > > memmap_init_range(nr_pages, nid, zone_idx(zone), start_pfn, 0,
> > > MEMINIT_HOTPLUG, altmap, migratetype,
> > > isolate_pageblock);
> > > -
> > > - set_zone_contiguous(zone);
> > move_pfn_range_to_zone() is also called from memremap::pagemap_range().
> > Shouldn't we add set_zone_contiguous() there as well?
>
> I did not find the place where the online_pages was invoked along path of
> the memremap:pagemap_range() function. Would there be other functions to
> online the pages remapped? Much appreciated for the guidance.
Currently when we do memremap_pages() we have
memremap_pages() ->
pagemap_range() ->
move_pfn_range_to_zone() ->
set_zone_contiguous();
Once set_zone_contiguous() is moved out from move_pfn_range_to_zone(),
memremap_pages() path never calls it.
I'm not sure if the pages added in memremap_pages() are online, but to keep
it's current behaviour I think it should call set_zone_contiguous()
explicitly.
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2026-01-27 6:53 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 14:33 [PATCH v8 0/3] Optimize zone->contiguous update and issue fix Tianyou Li
2026-01-20 14:33 ` [PATCH v8 1/3] mm/memory hotplug: Fix zone->contiguous always false when hotplug Tianyou Li
2026-01-22 11:16 ` Mike Rapoport
2026-01-24 12:18 ` Li, Tianyou
2026-01-26 21:58 ` Andrew Morton
2026-01-28 14:16 ` Li, Tianyou
2026-01-27 6:53 ` Mike Rapoport [this message]
2026-01-28 13:49 ` Li, Tianyou
2026-01-20 14:33 ` [PATCH v8 2/3] mm/memory hotplug/unplug: Add online_memory_block_pages() and offline_memory_block_pages() Tianyou Li
2026-01-22 11:32 ` Mike Rapoport
2026-01-24 12:30 ` Li, Tianyou
2026-01-27 6:58 ` Mike Rapoport
2026-01-28 13:56 ` Li, Tianyou
2026-01-20 14:33 ` [PATCH v8 3/3] mm/memory hotplug/unplug: Optimize zone->contiguous update when changes pfn range Tianyou Li
2026-01-22 11:43 ` Mike Rapoport
2026-01-24 12:43 ` Li, Tianyou
2026-01-27 7:10 ` Mike Rapoport
2026-01-28 14:11 ` Li, Tianyou
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=aXhg5k_iAwzQr8Wa@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