From patchwork Wed Jul 12 07:48:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 13309690 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 530E2EB64D9 for ; Wed, 12 Jul 2023 07:49:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E77A46B0072; Wed, 12 Jul 2023 03:49:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E28356B0075; Wed, 12 Jul 2023 03:49:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D175F6B0078; Wed, 12 Jul 2023 03:49:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id C58CE6B0072 for ; Wed, 12 Jul 2023 03:49:19 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 98B691401A3 for ; Wed, 12 Jul 2023 07:49:19 +0000 (UTC) X-FDA: 81002184438.24.8EA2A6C Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by imf26.hostedemail.com (Postfix) with ESMTP id AD627140010 for ; Wed, 12 Jul 2023 07:49:17 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Snlibjwe; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf26.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.20 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=1689148157; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=UZDClLW28dPkcMGqMjzuiTBuAqJ8RCZqiVXdFO+ISAw=; b=Ryjr46VQhHHJq27mDBIRCVbtXJCYJlZVI9I5L2kn1t7CdAvGibvvppqzL5BHLQNp0Zjdt1 4SqrXTlqXU6YszV58hDxvw8nG2l9c5kaoGAAkf8l00b+YdfBGx6zsc7iXPWQVc3JAyQfy6 cxAg4F/l66BJUt8bnnf8vahsMZaX0Ww= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=Snlibjwe; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf26.hostedemail.com: domain of ying.huang@intel.com designates 134.134.136.20 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689148157; a=rsa-sha256; cv=none; b=5KY9BMiNN+iKA/4fJyuY8OWQtcSNtk91abHoS5Kl3cBMiOtF9VGKNlJM3xfyly7Bz2Jv3H XJG2k5d6Gp/a6dCnkVGkZDlICpkc4tJhd62f2zlx7Rrl0+J1t5CI9qFuVwWPdKIlMFjCOC KlOuSVa7UJEDmFyhPwyJHVEfTVMtEGQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689148157; x=1720684157; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4myecPwu5Ccazp290GdECvXjfGsVAVkoX8NsXNv5t8M=; b=Snlibjwe+a0hFZ2bwvafjmkh/IKTvFM7MXpy8XYc2+cPikJcHftRgEhX mHyQ51DczCCBSMgVuRH0Cl635CwJKdw/a91BNu9ABJe+pf/mG3JdQSNeU PSrENgYhDuTwYW8H3+Vcc5GnTqWPnvuDC0pI0XXRhfzoFwV8+fWnzFM/I WMd+UJv0ySH+rAWdrrSWPS5iwywfIB29OxlJSifF9GCzUZoZ784xURvC0 TTAyEgURpPjqf3QVsMN5H9XSHd3ZSS/OphKBUyRb89CqoLgubPJxwB/uz pymS5YUmuKPTYZ89jjh0c+bkDxyreZwfcXwG5uauhkJdvmn1z4bGho7Ha g==; X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="354734485" X-IronPort-AV: E=Sophos;i="6.01,199,1684825200"; d="scan'208";a="354734485" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2023 00:49:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="698744813" X-IronPort-AV: E=Sophos;i="6.01,199,1684825200"; d="scan'208";a="698744813" Received: from yhuang6-mobl2.sh.intel.com ([10.238.6.30]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jul 2023 00:49:11 -0700 From: Huang Ying To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Huang Ying , "Aneesh Kumar K . V" , Wei Xu , Alistair Popple , Dan Williams , Dave Hansen , Davidlohr Bueso , Johannes Weiner , Jonathan Cameron , Michal Hocko , Yang Shi , Rafael J Wysocki Subject: [PATCH 0/4] memory tiering: calculate abstract distance based on ACPI HMAT Date: Wed, 12 Jul 2023 15:48:56 +0800 Message-Id: <20230712074900.404064-1-ying.huang@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: AD627140010 X-Stat-Signature: ft9t5da4kuj6g4ismr7isxeebkpdc1u4 X-HE-Tag: 1689148157-878234 X-HE-Meta: U2FsdGVkX1++rdWhniov0tAK8/5yzcN+h1PW2z+b/Z42W4JsG0CWGFHj1TNXDXP0ePWNeraPtsAQPg8k1u9EcZM3AR8HbxaU44Xhg704lXK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.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: We have the explicit memory tiers framework to manage systems with multiple types of memory, e.g., DRAM in DIMM slots and CXL memory devices. Where, same kind of memory devices will be grouped into memory types, then put into memory tiers. To describe the performance of a memory type, abstract distance is defined. Which is in direct proportion to the memory latency and inversely proportional to the memory bandwidth. To keep the code as simple as possible, fixed abstract distance is used in dax/kmem to describe slow memory such as Optane DCPMM. To support more memory types, in this series, we added the abstract distance calculation algorithm management mechanism, provided a algorithm implementation based on ACPI HMAT, and used the general abstract distance calculation interface in dax/kmem driver. So, dax/kmem can support HBM (high bandwidth memory) in addition to the original Optane DCPMM. Changelog: V1 (from RFC): - Added some comments per Aneesh's comments, Thanks! Best Regards, Huang, Ying