From patchwork Fri Jul 21 01:29:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, Ying" X-Patchwork-Id: 13321213 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 67B52C001DF for ; Fri, 21 Jul 2023 01:45:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F40AD280176; Thu, 20 Jul 2023 21:45:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EF13C28004C; Thu, 20 Jul 2023 21:45:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DB953280176; Thu, 20 Jul 2023 21:45:08 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id C94AF28004C for ; Thu, 20 Jul 2023 21:45:08 -0400 (EDT) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 95D54A01CE for ; Fri, 21 Jul 2023 01:45:08 +0000 (UTC) X-FDA: 81033925896.27.AFDF1EC Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by imf11.hostedemail.com (Postfix) with ESMTP id 770844000C for ; Fri, 21 Jul 2023 01:45:06 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=LBobUoLf; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf11.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.151 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=1689903906; 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=k3YqEi87tWELlfOkrd3XHZpvrXk7DS8gDZ3ATewm9Q5Blsu454jvLeocqu0ZTIOHYYVB0K y5+oW3Cd4EIZsCUNgtg4+Dq4HiaxlE9WvPeVlDE88z+wSNHgA0Q7+t4z1wEhUJd/pEjjNX oi+LVjpttLpWFp1brcfKei6Fycbc8Kw= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=LBobUoLf; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf11.hostedemail.com: domain of ying.huang@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=ying.huang@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689903906; a=rsa-sha256; cv=none; b=4Uw73f2vGeZj6nXIFa6L7PXH9ws//diF3iKk8swD7VZ5Y1xGU63aU8LyXXFeQvWx6iVvO3 1DwbF8uotQ6JqtnirBhhwitDGLTfleJRrmzzgD/xKXUoWTVWJNzGYvrCZkk0KZW392K8zW pYTdAVwsG65iSJ1m+hSAYsLLG4+NhnU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689903906; x=1721439906; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4myecPwu5Ccazp290GdECvXjfGsVAVkoX8NsXNv5t8M=; b=LBobUoLfDzayJqW9OfSjZhQxxGwLTRXLLVTyN6rhFxsJUr3+YziOM3MN ETzg6vNGfK/IV+yVxwWka6iBhjEIzAErGYx8uzEvHsquA+BD36V5ldDPI 3bfo9basWujWDDWA5nQVhstPf+400yDs3g+4D0CL/oVX194e7R4Whj+8v drQ69hZ410zTlOHlDrFQZBmI4oRY3f7xO8n7l74ve5JH0g6YiT35+S/Zy LbfmBKkvuY6Npqmh6gW6DKhFb5VqSGVqons+Qwqn8GfGbWBSou8qEibx4 KCiS9VpjIliFR1dg4Xz7FF+RdMxP1GBA5P0E0A1yhZiP0WDXoH66cpey7 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="347214124" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="347214124" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2023 18:45:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="724670858" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="724670858" Received: from yanfeng1-mobl.ccr.corp.intel.com (HELO yhuang6-mobl2.ccr.corp.intel.com) ([10.255.29.24]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2023 18:44:59 -0700 From: Huang Ying To: Andrew Morton Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-cxl@vger.kernel.org, nvdimm@lists.linux.dev, linux-acpi@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 RESEND 0/4] memory tiering: calculate abstract distance based on ACPI HMAT Date: Fri, 21 Jul 2023 09:29:28 +0800 Message-Id: <20230721012932.190742-1-ying.huang@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: t4gkn1wpujwdbo5m38r4za8ftztze6yt X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 770844000C X-HE-Tag: 1689903906-734301 X-HE-Meta: U2FsdGVkX1/QK3Jyi/f+6OK0bJgg0CQyKwpKB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UBEuvmKzwG/e01Sm 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: 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