From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 443C4C5478C for ; Tue, 5 Mar 2024 07:39:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D41396B0093; Tue, 5 Mar 2024 02:39:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CF1336B0095; Tue, 5 Mar 2024 02:39:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB9006B0096; Tue, 5 Mar 2024 02:39:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id AB2846B0093 for ; Tue, 5 Mar 2024 02:39:13 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 86DBAA0904 for ; Tue, 5 Mar 2024 07:39:13 +0000 (UTC) X-FDA: 81862184586.07.0C0BA4F Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by imf09.hostedemail.com (Postfix) with ESMTP id AD3CE140004 for ; Tue, 5 Mar 2024 07:39:11 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=HD+4n2+m; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf09.hostedemail.com: domain of ying.huang@intel.com designates 192.198.163.16 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709624351; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=dc/2Ff4YJ1W1dgLMEQHduFIIV7o62CXz5ZpCEHiZStI=; b=BtyqNqLpCQk2pJsCWPcyoSRHaVi2LqlfVLAgKXZInjL7ojoU4OiYWpv1vhffhHChxgPk28 sAAQTmCc4x4eirIjWd4Nw7I4pbqlnst+N9HSfDsSuZiGQEYJRQdePtHhcNXullnZZn55Tk WABTjbZmzGw7m5tdnXwkuvhp2YpbecQ= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=HD+4n2+m; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf09.hostedemail.com: domain of ying.huang@intel.com designates 192.198.163.16 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709624351; a=rsa-sha256; cv=none; b=QJA3VFiHGzY+0UeHhOh1/oMHcMOv+SLzD4C1+W6k8EGr7ndLeCGM+Jc8A4K2cfrIqK7uHG evjQun5zCAh5v/SeUZypZxOvz5Da63ws89XeFSlP3KR2nio7uxUJV7ueiwRWd3d3g3wu9p gr2fO0AUz+IO8cgjIEihmdvsVOoXJ+g= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709624352; x=1741160352; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version:content-transfer-encoding; bh=A28suRbme1QZpr/dRcM4LmjGdNPiTUN8DUTSDscbeIQ=; b=HD+4n2+mZy2rWWYIuPOmPuoiK6j5pHPfwNwN7g+IVUg+i8PAvLgolqFu xBtTWJdXCivkuF52AA0Wcfg55XyxRua8GnFPK3pTPn/5zm/qMtBpV4nKY y4t45mjZyvjRjZzrV7NrnjdsR4kHMxVV8Dx1F9gscx5Bqb25ZDQSeysoD 3vhG5NZxsQ4gdfkB2MSbU9sdtlnaR/2tLR7RqwbVWar9oFvVzQ6iNxhq1 msk6fCON+HYzSeEus9bykcwo47YvzDvs63NdsCRUNiaqA1AEIJGgX042K pVSZbbTFrlE+SBdAoDtvPtMMgAAYB95DATsdtezWA0bL7PXQuq5oRXhoP A==; X-IronPort-AV: E=McAfee;i="6600,9927,11003"; a="4742116" X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="4742116" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 23:39:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,205,1705392000"; d="scan'208";a="9185248" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by fmviesa009-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Mar 2024 23:39:05 -0800 From: "Huang, Ying" To: "Ho-Ren (Jack) Chuang" Cc: Gregory Price , aneesh.kumar@linux.ibm.com, mhocko@suse.com, tj@kernel.org, john@jagalactic.com, Eishan Mirakhur , Vinicius Tavares Petrucci , Ravis OpenSrc , Alistair Popple , "Rafael J. Wysocki" , Len Brown , Andrew Morton , Dave Jiang , Dan Williams , Jonathan Cameron , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, "Ho-Ren (Jack) Chuang" , "Ho-Ren (Jack) Chuang" , linux-cxl@vger.kernel.org, qemu-devel@nongnu.org Subject: Re: [External] Re: [PATCH v1 0/1] Improved Memory Tier Creation for CPUless NUMA Nodes In-Reply-To: (Ho-Ren Chuang's message of "Mon, 4 Mar 2024 23:10:39 -0800") References: <20240301082248.3456086-1-horenchuang@bytedance.com> <87frx6btqp.fsf@yhuang6-desk2.ccr.corp.intel.com> <87h6hl9og3.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Tue, 05 Mar 2024 15:37:10 +0800 Message-ID: <87zfvd86zd.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Stat-Signature: ab61bd877fxkdegg3rtwgs8zpjfbzp8h X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: AD3CE140004 X-HE-Tag: 1709624351-822437 X-HE-Meta: U2FsdGVkX18K/lZJUFIPWTb94ekbxykisaA8q2SUXM7h5rxe8SIZprWmS8QGyoQu7lU0Up7mFtbllhKESLbYl8nh2NJUe8sAgtS7ftdLd6p4XJOGZ18hsNtQA9CGH/365JQ0bIl1IwwJhtbA5+zLldvr4kQvsLUgbQytbG2C4YJ+UgTQMpLFiKAEGJ/ohNpL9t7LSwG19woCKkzU9TS+TAO+walyQiddRnvVbvCmQuqQBs1qH7jk7T0pQbOzT3yFVtAgvcBDmxXB0MDIj2u05e85vv9UrAAO/1OUU+uP3ggdNYavxN22E/nRi7GJQvv3mu+5Xga7My9BpWJDIpGHXPWJdAiUNJFnL54Ybdk9Xrxc7MXxVs1F/FznpLzo2wiMp2SryC6q3Rid1G1mY70PeHDDPG8iJcTg4cWy4EfA2vkMIbFEF7wpzft+UDevsC5RYIl7XJqyFzhqgMepoD7Xn5c57+mRgTw5IEQQupffbRSbe2vGQq8rzcZg8FMSCkkUXxRvy+DnUvXQ/hWxSBE7Yp5cwkcetripoDE8Xe88FKAWzXYYUr2UoUHLn8ol7cnWcrWXSsWffyrAxJlI3fgerfiPtxkx5mt/2i6W9DvEeFGtg5DarzzOUneX4Sbgvhe6lG+CdI4T+wz0ecVIODUEScIaJCnMX2XsGXrZQtW6pjVUnoH2xVC2Wal9m0slh0FXO6cq5vvTRO2MmoM1eFyM2LskSh1BtrVLY3l77DBllPH+RusUWZ72NukRKFJwNRK73iht/5mRzCeiwIsAKeKJjBJdzmiPL0dDgPSLoENzEGbq9nSnmU4F8IZZTZkeMdc4wyHbbK9yXmAlqeYmWIanedFQJZGTZihwbXwCz7rjfcaBD3OYQkSdR5Bou/OcopeGa3utCp22OFiREwOOiaDldSHqyEmRstfuMTcd7xi6ZDM= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: "Ho-Ren (Jack) Chuang" writes: > On Mon, Mar 4, 2024 at 10:36=E2=80=AFPM Huang, Ying wrote: >> >> "Ho-Ren (Jack) Chuang" writes: >> >> > On Sun, Mar 3, 2024 at 6:47=E2=80=AFPM Huang, Ying wrote: >> >> >> >> "Ho-Ren (Jack) Chuang" writes: >> >> >> >> > The memory tiering component in the kernel is functionally useless = for >> >> > CPUless memory/non-DRAM devices like CXL1.1 type3 memory because th= e nodes >> >> > are lumped together in the DRAM tier. >> >> > https://lore.kernel.org/linux-mm/PH0PR08MB7955E9F08CCB64F23963B5C3A= 860A@PH0PR08MB7955.namprd08.prod.outlook.com/T/ >> >> >> >> I think that it's unfair to call it "useless". Yes, it doesn't work = if >> >> the CXL memory device are not enumerate via drivers/dax/kmem.c. So, >> >> please be specific about in which cases it doesn't work instead of too >> >> general "useless". >> >> >> > >> > Thank you and I didn't mean anything specific. I simply reused phrases >> > we discussed >> > earlier in the previous patchset. I will change them to the following = in v2: >> > "At boot time, current memory tiering assigns all detected memory nodes >> > to the same DRAM tier. This results in CPUless memory/non-DRAM devices, >> > such as CXL1.1 type3 memory, being unable to be assigned to the >> > correct memory tier, >> > leading to the inability to migrate pages between different types of m= emory." >> > >> > Please see if this looks more specific. >> >> I don't think that the description above is accurate. In fact, there >> are 2 ways to enumerate the memory device, >> >> 1. Mark it as reserved memory (E820_TYPE_SOFT_RESERVED, etc.) in E820 >> table or something similar. >> >> 2. Mark it as normal memory (E820_TYPE_RAM) in E820 table or something >> similar >> >> For 1, the memory device (including CXL memory) is onlined via >> drivers/dax/kmem.c, so will be put in proper memory tiers. For 2, the >> memory device is indistinguishable with normal DRAM with current >> implementation. And this is what this patch is working on. >> >> Right? > > Good point! How about this?: > " > When a memory device, such as CXL1.1 type3 memory, is emulated as > normal memory (E820_TYPE_RAM), the memory device is indistinguishable > from normal DRAM in terms of memory tiering with the current implementati= on. > The current memory tiering assigns all detected normal memory nodes > to the same DRAM tier. This results in normal memory devices with > different attributions being unable to be assigned to the correct memory = tier, > leading to the inability to migrate pages between different types of memo= ry. > " Looks good me! Thanks! -- Best Regards, Huang, Ying