From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) (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 31072313E31 for ; Mon, 5 Jan 2026 10:18:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.176.79.56 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767608332; cv=none; b=tcztvZW3qvGqc365ZIF5t+fNkG0PzI33YQ4DR9IHm/f+4/k+rt5aIJvPBvuSeAItb2TMRAhZOtCfEzA8Tu2tZU4Zkz2uW1+aXVzUoKf9Du30jSngXWOxzSVkTp3ViMWrDqC/5gcFeQcR3o2ZEarR5NP8sTj28JiyOpwy67LZdMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767608332; c=relaxed/simple; bh=u0jXSpEkg4bxoAUy48cRSQIRJYWNFdP0a5jL25USTiY=; h=Date:From:To:CC:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=lYKoL5X5JGnwaNnrAzgaUoDw3KFJd23HVLagOGHLyCtj/DRYYNEZqdLXk9xyxFrqGUDgwIaAiyIEWGZcog/cIOcnf3Gcp3n0A0YuoKWywFW2Ol3SagYY210BH114wHFzXUChxZsBiLMLU0uCIqfrq+wALXX6z/rH8+/aMMteQjo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=185.176.79.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.18.224.83]) by frasgout.his.huawei.com (SkyGuard) with ESMTPS id 4dl8qv0L4MzJ46DM; Mon, 5 Jan 2026 17:58:03 +0800 (CST) Received: from dubpeml100005.china.huawei.com (unknown [7.214.146.113]) by mail.maildlp.com (Postfix) with ESMTPS id 3A06940569; Mon, 5 Jan 2026 17:59:03 +0800 (CST) Received: from localhost (10.48.146.88) by dubpeml100005.china.huawei.com (7.214.146.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.36; Mon, 5 Jan 2026 09:59:02 +0000 Date: Mon, 5 Jan 2026 09:59:00 +0000 From: Jonathan Cameron To: Mike Rapoport CC: Cui Chao , Andrew Morton , , , Subject: Re: [PATCH] mm: numa_memblks: Identify the accurate NUMA ID of CFMW Message-ID: <20260105095900.00005c09@huawei.com> In-Reply-To: References: <20251230092750.856060-1-cuichao1753@phytium.com.cn> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.42; x86_64-w64-mingw32) 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="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: lhrpeml500010.china.huawei.com (7.191.174.240) To dubpeml100005.china.huawei.com (7.214.146.113) On Mon, 5 Jan 2026 11:34:55 +0200 Mike Rapoport wrote: > On Mon, Jan 05, 2026 at 10:38:30AM +0800, Cui Chao wrote: > > Hi, > >=20 > > Thank you for your review. > >=20 > > On 12/30/2025 11:18 PM, Mike Rapoport wrote: =20 > > > Hi, > > >=20 > > > On Tue, Dec 30, 2025 at 05:27:50PM +0800, Cui Chao wrote: =20 > > > > In some physical memory layout designs, the address space of CFMW > > > > resides between multiple segments of system memory belonging to > > > > the same NUMA node. In numa_cleanup_meminfo, these multiple segments > > > > of system memory are merged into a larger numa_memblk. When > > > > identifying which NUMA node the CFMW belongs to, it may be incorrec= tly > > > > assigned to the NUMA node of the merged system memory. To address t= his =20 > > > Can you please provide an example of such memory layout? =20 > >=20 > > Example memory layout: > >=20 > > Physical address space: > > =A0 =A0 0x00000000 - 0x1FFFFFFF=A0 System RAM (node0) > > =A0 =A0 0x20000000 - 0x2FFFFFFF=A0 CXL CFMW (node2) > > =A0 =A0 0x40000000 - 0x5FFFFFFF=A0 System RAM (node0) > > =A0 =A0 0x60000000 - 0x7FFFFFFF=A0 System RAM (node1) > >=20 > > After numa_cleanup_meminfo, the two node0 segments are merged into one: > > =A0 =A0 0x00000000 - 0x5FFFFFFF=A0 System RAM (node0)=A0 // CFMW is ins= ide this > > range > > =A0 =A0 0x60000000 - 0x7FFFFFFF=A0 System RAM (node1) > >=20 > > So the CFMW (0x20000000-0x2FFFFFFF) will be incorrectly assigned to nod= e0. =20 >=20 > Can you please add this example to the changelog? # Also, please +CC linux-cxl@vger.kernel.org given this is all about how we handle the CXL fixed memory windows. > =20 > > > > scenario, accurately identifying the correct NUMA node can be achie= ved > > > > by checking whether the region belongs to both numa_meminfo and > > > > numa_reserved_meminfo. > > > >=20 > > > > Signed-off-by: Cui Chao =20 >=20