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 B581EC3DA49 for ; Wed, 31 Jul 2024 01:14:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 03B046B0085; Tue, 30 Jul 2024 21:14:01 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F2CF66B0088; Tue, 30 Jul 2024 21:14:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DF44B6B0089; Tue, 30 Jul 2024 21:14:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id C16FB6B0085 for ; Tue, 30 Jul 2024 21:14:00 -0400 (EDT) Received: from smtpin03.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 828B81A0179 for ; Wed, 31 Jul 2024 01:14:00 +0000 (UTC) X-FDA: 82398276240.03.21705E2 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.16]) by imf05.hostedemail.com (Postfix) with ESMTP id 59C3910000B for ; Wed, 31 Jul 2024 01:13:57 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Hx3AlSao; spf=pass (imf05.hostedemail.com: domain of ying.huang@intel.com designates 198.175.65.16 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1722388410; a=rsa-sha256; cv=none; b=pKUkY2+ZGWK0dzDHSRteZRQ0NpOf4iyIhnAYop5474XhO+xnFvOKQcATX1qdwrYD1lzc5y T3uEN/29qkls/OO1yHt61TL8K56RNs9iNcbQsqaE91+w1KUpe5GN+3dUMlbsfdgpDjagZt bzIovCtmRS7OnRawBQ28Rn666p9KZE4= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Hx3AlSao; spf=pass (imf05.hostedemail.com: domain of ying.huang@intel.com designates 198.175.65.16 as permitted sender) smtp.mailfrom=ying.huang@intel.com; dmarc=pass (policy=none) header.from=intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1722388410; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UjlHFdmKD9HXHrfhlycfurXeEs5jyooKVddwjNskDjQ=; b=J9V+rOyyufcsOKLKll8nx04bzSRA7DtnG7LpoK5WeOM0pQkaGVNhL+GrQ7pY3cY0+b+OA0 nRo9nWTvnaXIig5zbOuin0wOlrqI4AOyLbv2E7DjIchI2ceca4+x5gRBh3l76jlkbgi8dT nXZXhb+Z08y6Bq8OMmfhl0juJjLPvEY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1722388437; x=1753924437; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=78yMmcZVlmd5TrKBTEgQshl8q07jNsjdTZNobhmCpJc=; b=Hx3AlSao3wj0c+81pj9RHAANVT1EqFntW/PvSF1O+AklrXlBCBsjta0G AT8+/nkT8zahS+8SG6EdoqT5tLckUvATFk116hFwPE9DkINnDLubY+yQb kNW+fKoM80fARugTR5R9wupJ8IkSw3V9z+t0+WkHrxuk4kmQEPTeGMFVE RZ9/jokLQce/WwAoF2AxlsHi1WiZv8oRxEpU9L4EOOlHM2uLldMYW6rkw cHIRQT8u9ft5xH+lw/udNgrxE4DM1DCLe5WDvL/sKaqni/MYw/khFC4Zh zaVgRmIjlLxj4RIOjeQxknnGxI72ij3eTMx+eyu7LJ9fhL75wYO4e9Joj A==; X-CSE-ConnectionGUID: LSyMk8YiQwOgtVA73U450g== X-CSE-MsgGUID: iYIpKkx1SsO1QK2RLbHknw== X-IronPort-AV: E=McAfee;i="6700,10204,11149"; a="20397510" X-IronPort-AV: E=Sophos;i="6.09,250,1716274800"; d="scan'208";a="20397510" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2024 18:13:55 -0700 X-CSE-ConnectionGUID: 65vHl553Q8esf4wM6tUaew== X-CSE-MsgGUID: vL7bv7S2RJuHoCdf/QA5iA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.09,250,1716274800"; d="scan'208";a="54561071" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2024 18:13:53 -0700 From: "Huang, Ying" To: Gregory Price Cc: linux-mm@kvack.org, akpm@linux-foundation.org, dave.jiang@intel.com, Jonathan.Cameron@huawei.com, horenchuang@bytedance.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, dan.j.williams@intel.com, lenb@kernel.org, "Aneesh Kumar K.V" Subject: Re: [PATCH] acpi/hmat,mm/memtier: always register hmat adist calculation callback In-Reply-To: (Gregory Price's message of "Tue, 30 Jul 2024 01:19:53 -0400") References: <20240726215548.10653-1-gourry@gourry.net> <87ttg91046.fsf@yhuang6-desk2.ccr.corp.intel.com> <877cd3u1go.fsf@yhuang6-desk2.ccr.corp.intel.com> Date: Wed, 31 Jul 2024 09:10:19 +0800 Message-ID: <87h6c6pds4.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii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A0rEHx8Kz0nVXEq5 2lxyqzdX Nih4MxWBRXoxu9mMcmfzMv1zNUdBtUstUgUGqcPVJEz9LXrJEU0P7P+NmptHEBeOwU5j1BvDzSVE7d/tewU9YpPMATm85yYMIMshCc4y10Sxhq2mWl6i3BeyWC0gWvt0u9AmUB4SOOg5leenQDVe9DgXVSpsB/PnvhDIDC7llfw2oi044OlK/Bui+d9Yf7NTJc44La4ReXZCcXc4= 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: Gregory Price writes: > On Tue, Jul 30, 2024 at 09:12:55AM +0800, Huang, Ying wrote: >> > Right now HMAT appears to be used prescriptively, this despite the fact >> > that there was a clear intent to separate CPU-nodes and non-CPU-nodes in >> > the memory-tier code. So this patch simply realizes this intent when the >> > hints are not very reasonable. >> >> If HMAT isn't available, it's hard to put memory devices to >> appropriate memory tiers without other information. In commit >> 992bf77591cb ("mm/demotion: add support for explicit memory tiers"), >> Aneesh pointed out that it doesn't work for his system to put >> non-CPU-nodes in lower tier. >> > > Per Aneesh in 992bf77591cb - The code explicitly states the intent is > to put non-CPU-nodes in a lower tier by default. > > > The current implementation puts all nodes with CPU into the highest > tier, and builds the tier hierarchy by establishing the per-node > demotion targets based on the distances between nodes. This describe the behavior before the commit. That is, to be changed in the commit. One of the most important issues he want to fix is, * The current tier initialization code always initializes each memory-only NUMA node into a lower tier. But a memory-only NUMA node may have a high performance memory device (e.g. a DRAM-backed memory-only node on a virtual machine) and that should be put into a higher tier. > This is accurate for the current code > > > The current tier initialization code always initializes each > memory-only NUMA node into a lower tier. > > This is *broken* for the currently upstream code. > > This appears to be the result of the hmat adistance callback introduction > (though it may have been broken before that). No, this was changed in Aneesh's commit 992bf77591cb. -- Best Regards, Huang, Ying