Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10310913rwp; Thu, 20 Jul 2023 19:03:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlHcy6faTcC9Wo3Ru9YqcVVe1OZVHo6tKr23umKc0gLJpvZcFco8BrazZfmCQPzMbLFX+uHh X-Received: by 2002:a05:6e02:1b8d:b0:346:917:3e57 with SMTP id h13-20020a056e021b8d00b0034609173e57mr835174ili.15.1689905033780; Thu, 20 Jul 2023 19:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689905033; cv=none; d=google.com; s=arc-20160816; b=Mx/1NL9TN9rm6VCYxZ4YFiEdUWYbbTfN30Z02/QrBs+76mCIhDrV7MdAMu2/6ZQdyK 81QR0IJae0W1aO0SRViynTdaplegEV7+nINW2oO0/R9njr+114m6LrjJI//EtTnnekrb yYN0l786QX1KISHHpMhIyKjH3yfPcmD6fdeJ4Zm1ocvtG0zu1c+TI7hJqmrDt7xg8QXH 5fah+rqFUJAMUQ3q52gzd6SaItJ/wQPgaL70phJJSHCMiCCkniTVVarOnzLC5q8Qs236 EzL5YXYeAMfARocJOT9D5iBVtJdAdOpQ545xWp05C61hjXekoiVz1mGqx6sGtZRc9W3E E7qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UZDClLW28dPkcMGqMjzuiTBuAqJ8RCZqiVXdFO+ISAw=; fh=lzKkhZyaUrhNkIakGPxlbJijiu34Upm1x29wDAUxkMQ=; b=q/t92yTICSVOhgi7e/A16wWU5pWQrgS/qMNZM1JporFR438hZt1I8zbAmsksJaAlft MfgR6MJWuG+mX9NY6SuHFrtvZu7vajQ35eC5MLRvDW8iJrOzwVOmnMJAk/sETkq2pXXP awCM9fooOsSbWO2+zMpZIxYBXKHy+s+2Py2MajwODgKN4vvc9pDunxSXBFxGWmvGddCc Yx6TEsx+RbCyjW6HBLYMSPaQKaaOgMcAB0xF09trllDP3EhWiif9QCbsK1cIpDLkvI7f d1jFeAhVqC28WUMDt6v1XU7h6rrp8u72a0YjGau9YCLOxgMEB0P5wP8Nu3I2tUddkpTh E9vw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="FKGMW/N2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u11-20020a6540cb000000b0055e2bb303b5si1846814pgp.881.2023.07.20.19.03.41; Thu, 20 Jul 2023 19:03:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="FKGMW/N2"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229885AbjGUBpH (ORCPT + 99 others); Thu, 20 Jul 2023 21:45:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229450AbjGUBpF (ORCPT ); Thu, 20 Jul 2023 21:45:05 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2995F186; Thu, 20 Jul 2023 18:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689903905; x=1721439905; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4myecPwu5Ccazp290GdECvXjfGsVAVkoX8NsXNv5t8M=; b=FKGMW/N22cBrAlIUhPKXOVk6LOeicg5kiJpBNH6ixnGsZJz76QPw0z0e 58LNGEeiFcog5NDpcB9G/Ar9rR4xrdWL9QucdiYrBvlI/7OQg0xskfoOR KSoXJc6wn29lvLKDE31clL9W6diFOUNxZ7AGmP8vs9ahNF8vCuaVPpPaU 3V1CrOw6Rl5cRPOEEvhysLm6aFhE8x+1gpxERR+el8/fcwLcjkVuaLY3h eqmsXNxsVuTPOPb7qIiOAiMJvPxDKXkekLzZPWVn4iCSWPKqTB0mGkFEM pbUyKu4kLBn27uZ2mBf4k9TcGiopVk0OZj3vKcK257J/CciNOph1FIhaC g==; X-IronPort-AV: E=McAfee;i="6600,9927,10777"; a="347214116" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="347214116" 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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