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 1BB94C433EF for ; Thu, 31 Mar 2022 00:32:40 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 911966B0072; Wed, 30 Mar 2022 20:32:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 89A0F8D0002; Wed, 30 Mar 2022 20:32:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 714788D0001; Wed, 30 Mar 2022 20:32:39 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id 5AA7A6B0072 for ; Wed, 30 Mar 2022 20:32:39 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay12.hostedemail.com (Postfix) with ESMTP id 297FC120A03 for ; Thu, 31 Mar 2022 00:32:39 +0000 (UTC) X-FDA: 79302805638.07.339AB8B Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf10.hostedemail.com (Postfix) with ESMTP id 343B3C000C for ; Thu, 31 Mar 2022 00:32:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648686758; x=1680222758; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=LoTVhZ4P/qZYHzSeRGGVDsqEb1jnpbThtF8t4ridIaE=; b=UCW5Jf2YeYN16z6GsimKovxZNCV/C0lF5C8NaHMPgFZeChba5MsjwDLl /gBo4KgJWx5kjSoluBaEqD1JZZ8ElgbIFcPy/IKKXYANdZFKVLwiOJraE 5yJkDjarBEn4BOhs9J4ihNXi1GPyUfE3c4K5LTDVK5voxk5216OGcD+w8 WIEC5nRCkmhr8xjV2m6dBLXBEVmBeY/6tzaU0+KgmuvI5YrdemnyhePlc oRtBgvncjw8eeTCL8e1rBkzh+vOcp/9yg+5q9YNr2EWSzbz2T7v1lh0x/ /MX6h3TFGqorNnUlbIEW5cab3/cn4ILQO4tK8cKfQl5fE+pBJvNwJ1At1 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10302"; a="247179192" X-IronPort-AV: E=Sophos;i="5.90,223,1643702400"; d="scan'208";a="247179192" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 17:32:36 -0700 X-IronPort-AV: E=Sophos;i="5.90,223,1643702400"; d="scan'208";a="565952972" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.239.13.94]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 17:32:35 -0700 From: "Huang, Ying" To: "Aneesh Kumar K.V" Cc: Jagdish Gediya , linux-mm@kvack.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, baolin.wang@linux.alibaba.com, dave.hansen@linux.intel.com Subject: Re: [PATCH] mm: migrate: set demotion targets differently References: <20220329115222.8923-1-jvgediya@linux.ibm.com> <87pmm4c4ys.fsf@yhuang6-desk2.ccr.corp.intel.com> <87lewrxsv1.fsf@linux.ibm.com> Date: Thu, 31 Mar 2022 08:32:33 +0800 In-Reply-To: <87lewrxsv1.fsf@linux.ibm.com> (Aneesh Kumar K. V.'s message of "Wed, 30 Mar 2022 22:47:22 +0530") Message-ID: <878rsrc672.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=UCW5Jf2Y; spf=none (imf10.hostedemail.com: domain of ying.huang@intel.com has no SPF policy when checking 134.134.136.20) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 343B3C000C X-Stat-Signature: t8xe1qforcmjeb1cg7jep3zb7trq7xrp X-HE-Tag: 1648686757-61501 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000156, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: "Aneesh Kumar K.V" writes: > "Huang, Ying" writes: > >> Hi, Jagdish, >> >> Jagdish Gediya writes: >> > > ... > >>> e.g. with below NUMA topology, where node 0 & 1 are >>> cpu + dram nodes, node 2 & 3 are equally slower memory >>> only nodes, and node 4 is slowest memory only node, >>> >>> available: 5 nodes (0-4) >>> node 0 cpus: 0 1 >>> node 0 size: n MB >>> node 0 free: n MB >>> node 1 cpus: 2 3 >>> node 1 size: n MB >>> node 1 free: n MB >>> node 2 cpus: >>> node 2 size: n MB >>> node 2 free: n MB >>> node 3 cpus: >>> node 3 size: n MB >>> node 3 free: n MB >>> node 4 cpus: >>> node 4 size: n MB >>> node 4 free: n MB >>> node distances: >>> node 0 1 2 3 4 >>> 0: 10 20 40 40 80 >>> 1: 20 10 40 40 80 >>> 2: 40 40 10 40 80 >>> 3: 40 40 40 10 80 >>> 4: 80 80 80 80 10 >>> >>> The existing implementation gives below demotion targets, >>> >>> node demotion_target >>> 0 3, 2 >>> 1 4 >>> 2 X >>> 3 X >>> 4 X >>> >>> With this patch applied, below are the demotion targets, >>> >>> node demotion_target >>> 0 3, 2 >>> 1 3, 2 >>> 2 3 >>> 3 4 >>> 4 X >> >> For such machine, I think the perfect demotion order is, >> >> node demotion_target >> 0 2, 3 >> 1 2, 3 >> 2 4 >> 3 4 >> 4 X > > I guess the "equally slow nodes" is a confusing definition here. Now if the > system consists of 2 1GB equally slow memory and the firmware doesn't want to > differentiate between them, firmware can present a single NUMA node > with 2GB capacity? The fact that we are finding two NUMA nodes is a hint > that there is some difference between these two memory devices. This is > also captured by the fact that the distance between 2 and 3 is 40 and not 10. Do you have more information about this? Best Regards, Huang, Ying > For that specific topology where the distance between 2 and 3 is 40 and 2 > and 4 is 80, the demotion target derived by the new code is better > right? > > ... > > > -aneesh