From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4ADE732B9BB for ; Tue, 27 Jan 2026 06:53:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769496816; cv=none; b=MZbAIYieRC5R5B1ek8ZHlSNqdo/4NVCJ1UrlHjMyNtv6HVdbXJpxHgxjZwVXGqOVNRm6XsCNs+OlW71oVaf97efMZOgDLolZ5SDwugAf4EVJWVvCc6N+V9WkRDjh5ovsPzLE6HRRJzTuRQqCcNQMfRBa4tg2xXvsevgiqmlDQYQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769496816; c=relaxed/simple; bh=50wMCzxr36MRlb1hSig1KLolI+AyaL/USxre+7UqoW4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=e9hWgWsxaP6aD4W+djX7fw0xUEqHVkkQHynuk1G6n9EkHZA6zcTdehhwSIQRmaYUdNknGvZ9aHLtOCGme2z/ETlcVwkKJyM63hI2F/CZerF+iqrakqGa79FsuwclW+GU6M9QPW2SK/nBVhx46LZ5XyzxBBgRiZ2WYlqqTjz+y54= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kSCpHrcc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kSCpHrcc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23B3AC116C6; Tue, 27 Jan 2026 06:53:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1769496815; bh=50wMCzxr36MRlb1hSig1KLolI+AyaL/USxre+7UqoW4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kSCpHrcc9e+sZ5hxdjPvDcrO2ANHSEr9mFBfkc2sCkkCnk7Vpf8Xo94IUKBkBtb4e HxnM29pvbD3YkqtTY1qCItMhmppAIqRA7Cj7KplC8P7rfD+aytMe4x/K3vx8DrrG5b VjK3DAPcM8QT33XIA4zPfsH8cQJv2LG8zBM4EA25ikAhNmFTcyrpBeL1/y2DU5gLHt 9JKejy2umrwAxpOTtRvcS8K7hSr27xEroJdsksBwtOfKhMOCdtOHD4NZNLDtdIRN/U +2z91rXhj0DkRN4oHVpJiU0q4owEH1A7D/fdAZ4iRMzkDz1URC/sRK/vDzEDz4P/GY +CENkD+NbHKOw== Date: Tue, 27 Jan 2026 08:53:26 +0200 From: Mike Rapoport To: "Li, Tianyou" Cc: David Hildenbrand , Oscar Salvador , Wei Yang , Michal Hocko , linux-mm@kvack.org, Yong Hu , Nanhai Zou , Yuan Liu , Tim Chen , Qiuxu Zhuo , Yu C Chen , Pan Deng , Chen Zhang , linux-kernel@vger.kernel.org Subject: Re: [PATCH v8 1/3] mm/memory hotplug: Fix zone->contiguous always false when hotplug Message-ID: References: <20260120143346.1427837-1-tianyou.li@intel.com> <20260120143346.1427837-2-tianyou.li@intel.com> <804139fd-e210-4387-9a63-ac76f4df66c7@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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.