public inbox for linux-mm@kvack.org
 help / color / mirror / Atom feed
From: "David Hildenbrand (Arm)" <david@kernel.org>
To: Wei Yang <richard.weiyang@gmail.com>, Yuan Liu <yuan1.liu@intel.com>
Cc: Oscar Salvador <osalvador@suse.de>,
	Mike Rapoport <rppt@kernel.org>,
	linux-mm@kvack.org, Yong Hu <yong.hu@intel.com>,
	Nanhai Zou <nanhai.zou@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>,
	Tianyou Li <tianyou.li@intel.com>,
	Chen Zhang <zhangchen.kidd@jd.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] mm/memory hotplug/unplug: Optimize zone contiguous check when changing pfn range
Date: Thu, 16 Apr 2026 09:15:18 +0200	[thread overview]
Message-ID: <fa03804e-625f-4152-a119-389282d97902@kernel.org> (raw)
In-Reply-To: <20260416022351.llek76h5cik3nese@master>

On 4/16/26 04:23, Wei Yang wrote:
> On Tue, Apr 07, 2026 at 11:16:15PM -0400, Yuan Liu wrote:
> [...]
>>
>> /*
>> @@ -956,9 +957,22 @@ static void __init memmap_init_zone_range(struct zone *zone,
>> 	memmap_init_range(end_pfn - start_pfn, nid, zone_id, start_pfn,
>> 			  zone_end_pfn, MEMINIT_EARLY, NULL, MIGRATE_MOVABLE,
>> 			  false);
>> +	zone->pages_with_online_memmap += end_pfn - start_pfn;
>>
>> -	if (*hole_pfn < start_pfn)
>> -		init_unavailable_range(*hole_pfn, start_pfn, zone_id, nid);
>> +	if (*hole_pfn < start_pfn) {
>> +		unsigned long pgcnt;
>> +
>> +		if (*hole_pfn < zone_start_pfn) {
>> +			init_unavailable_range(*hole_pfn, zone_start_pfn,
>> +					       zone_id, nid);
> 
> One question here:
> 
> init_unavailable_range(zone_id)
>   __init_single_page(zone_id)
>     set_page_links(zone_id)
>       set_page_zone(page, zone_id)
> 
> [hole_pfn, zone_start_pfn) doesn't belong to this zone. Would this be
> a problem?
> 
> But it seems we have already done this for a long time.

Right, we just want "some" node/zone for holes that are indicated as
having an online memmap.

-- 
Cheers,

David


      reply	other threads:[~2026-04-16  7:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-08  3:16 [PATCH v3] mm/memory hotplug/unplug: Optimize zone contiguous check when changing pfn range Yuan Liu
2026-04-08  7:36 ` David Hildenbrand (Arm)
2026-04-08 12:29   ` Liu, Yuan1
2026-04-08 12:31     ` David Hildenbrand (Arm)
2026-04-08 12:37       ` Liu, Yuan1
2026-04-09 14:40   ` Mike Rapoport
2026-04-09 15:08     ` David Hildenbrand (Arm)
2026-04-14  7:06       ` Liu, Yuan1
2026-04-14  9:24         ` David Hildenbrand (Arm)
2026-04-13 13:06 ` Wei Yang
2026-04-13 18:24   ` David Hildenbrand (Arm)
2026-04-14  2:12     ` Wei Yang
2026-04-14  9:32       ` David Hildenbrand (Arm)
2026-04-15  2:30         ` Wei Yang
2026-04-15  9:11           ` David Hildenbrand (Arm)
2026-04-16  2:23 ` Wei Yang
2026-04-16  7:15   ` David Hildenbrand (Arm) [this message]

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=fa03804e-625f-4152-a119-389282d97902@kernel.org \
    --to=david@kernel.org \
    --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=qiuxu.zhuo@intel.com \
    --cc=richard.weiyang@gmail.com \
    --cc=rppt@kernel.org \
    --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