[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXhg5k_iAwzQr8Wa@kernel.org>
Date: Tue, 27 Jan 2026 08:53:26 +0200
From: Mike Rapoport <rppt@...nel.org>
To: "Li, Tianyou" <tianyou.li@...el.com>
Cc: David Hildenbrand <david@...nel.org>,
Oscar Salvador <osalvador@...e.de>,
Wei Yang <richard.weiyang@...il.com>,
Michal Hocko <mhocko@...e.com>, linux-mm@...ck.org,
Yong Hu <yong.hu@...el.com>, Nanhai Zou <nanhai.zou@...el.com>,
Yuan Liu <yuan1.liu@...el.com>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Qiuxu Zhuo <qiuxu.zhuo@...el.com>, Yu C Chen <yu.c.chen@...el.com>,
Pan Deng <pan.deng@...el.com>, Chen Zhang <zhangchen.kidd@...com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 1/3] mm/memory hotplug: Fix zone->contiguous always
false when hotplug
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.
Powered by blists - more mailing lists