From: "David Hildenbrand (Arm)" <david@kernel.org>
To: "Liu, Yuan1" <yuan1.liu@intel.com>,
Oscar Salvador <osalvador@suse.de>,
Mike Rapoport <rppt@kernel.org>,
Wei Yang <richard.weiyang@gmail.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
"Hu, Yong" <yong.hu@intel.com>,
"Zou, Nanhai" <nanhai.zou@intel.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
"Zhuo, Qiuxu" <qiuxu.zhuo@intel.com>,
"Chen, Yu C" <yu.c.chen@intel.com>,
"Deng, Pan" <pan.deng@intel.com>,
"Li, Tianyou" <tianyou.li@intel.com>,
Chen Zhang <zhangchen.kidd@jd.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/memory hotplug/unplug: Optimize zone contiguous check when changing pfn range
Date: Thu, 26 Mar 2026 10:23:21 +0100 [thread overview]
Message-ID: <b86f559b-6726-43b0-8270-4f041735b7d5@kernel.org> (raw)
In-Reply-To: <IA4PR11MB9009A2A582EF16AECE1828D8A356A@IA4PR11MB9009.namprd11.prod.outlook.com>
> About AI feedback below
>
> init_unavailable_range() uses for_each_valid_pfn() and skips unmapped
> sections that lack a mem_map. If the full hole size is added anyway,
> pages_with_online_memmap could artificially match spanned_pages for
> zones with missing sections.
>
> Could this make zone_is_contiguous() incorrectly return true, bypassing
> pfn_valid() checks and potentially dereferencing missing sections?
> unsinged long zone_hole_pages
>
> I think if I can update the pages_with_online_memmap in the
> init_unavailable_range directly.
See how I handled it: I simply return the number of initialized pages
from the function. I think that should do.
--
Cheers,
David
next prev parent reply other threads:[~2026-03-26 9:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 9:56 Yuan Liu
2026-03-19 10:08 ` Liu, Yuan1
2026-03-20 3:13 ` Andrew Morton
2026-03-23 10:56 ` David Hildenbrand (Arm)
2026-03-23 11:31 ` Mike Rapoport
2026-03-23 11:42 ` David Hildenbrand (Arm)
2026-03-26 7:30 ` Liu, Yuan1
2026-03-26 7:38 ` Chen, Yu C
2026-03-26 9:53 ` David Hildenbrand (Arm)
2026-03-27 7:47 ` Liu, Yuan1
2026-03-26 3:39 ` Liu, Yuan1
2026-03-26 9:23 ` David Hildenbrand (Arm) [this message]
2026-03-27 7:39 ` Liu, Yuan1
2026-03-23 11:51 ` Mike Rapoport
2026-03-26 7:32 ` Liu, Yuan1
[not found] ` <CGME20260409023553epcas2p2e40d1d79206f0169a765fadcf180b010@epcas2p2.samsung.com>
2026-04-09 2:35 ` Sion Ji
2026-04-09 3:20 ` Liu, Yuan1
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=b86f559b-6726-43b0-8270-4f041735b7d5@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