linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Li, Tianyou" <tianyou.li@intel.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>,
	Oscar Salvador <osalvador@suse.de>,
	Mike Rapoport <rppt@kernel.org>,
	Wei Yang <richard.weiyang@gmail.com>,
	Michal Hocko <mhocko@suse.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: <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] mm/memory hotplug: Fix zone->contiguous always false when hotplug
Date: Fri, 6 Feb 2026 22:08:26 +0800	[thread overview]
Message-ID: <12f4c0eb-fcd0-4157-b668-d0e8340d8219@intel.com> (raw)
In-Reply-To: <00d07c59-e573-40b6-a096-266ef14545b9@kernel.org>


On 2/6/2026 9:03 PM, David Hildenbrand (Arm) wrote
> On 1/30/26 17:09, Tianyou Li wrote:
>> From: Yuan Liu <yuan1.liu@intel.com>
>
> Nit: subject should start with "mm/memory_hotplug:"
>

Got it. My bad, will pay attention next time. Thanks David.


>>
>> set_zone_contiguous() uses __pageblock_pfn_to_page() to detect
>> pageblocks that either do not exist (hole) or that do not belong
>> to the same zone.
>>
>> __pageblock_pfn_to_page(), however, relies on pfn_to_online_page(),
>> effectively always returning NULL for memory ranges that were not
>> onlined yet. So when called on a range-to-be-onlined, it indicates
>> a memory hole to set_zone_contiguous().
>>
>> Consequently, the set_zone_contiguous() call in 
>> move_pfn_range_to_zone(),
>> which happens early during memory onlining, will never detect a
>> zone as being contiguous. Bad: the fast path relies on the zone
>> contiguous state may skipped.
>>
>> To fix the issue, move the set_zone_contiguous() call to a later
>> stage in memory onlining, where pfn_to_online_page() will succeed:
>> after we mark the memory sections to be online.
>>
>> Fixes: 2d070eab2e82 ("mm: consider zone which is not fully populated 
>> to have holes")
>> Cc: Michal Hocko <mhocko@suse.com>
>> Cc: stable@vger.kernel.org
>> Reviewed-by: Nanhai Zou <nanhai.zou@intel.com>
>> Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
>> Signed-off-by: Tianyou Li <tianyou.li@intel.com>
>
> How was Yuan Liu involved? If he is a co-author there is a
>
>     Co-developed-by: Yuan Liu <yuan1.liu@intel.com>
>
> missing.
>

Yes, Yuan Liu co-author the patch. Thanks and I will pay attention next 
time. Appreciated.


>
> Likely there is no resend required if you tell Andrew what to do, so 
> he can just fixup when applying.
>
> Acked-by: David Hildenbrand (Arm) <david@kernel.org>
>

+ Andrew Morton for awareness.

Hi Andrew,

Please kindly let me know if resend required or you are willing to 
kindly fixup the titile and Co-developed-by tag for me. Appreciated in 
advance for any additional burden that costs.

Regards,

Tianyou






      reply	other threads:[~2026-02-06 14:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-30 16:09 Tianyou Li
2026-02-06 13:03 ` David Hildenbrand (Arm)
2026-02-06 14:08   ` Li, Tianyou [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=12f4c0eb-fcd0-4157-b668-d0e8340d8219@intel.com \
    --to=tianyou.li@intel.com \
    --cc=akpm@linux-foundation.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=rppt@kernel.org \
    --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