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: 11910 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp982270vqm; Wed, 12 Jul 2023 01:00:40 -0700 (PDT) X-Google-Smtp-Source: APBJJlEoNa/GSVZvA5rBr7n3XgcSfStW0+Hwk5w+O1LS4umHGL1Tzz5+tYTMHZu6695mVJCdFIfB X-Received: by 2002:a17:906:51a:b0:982:2586:f85 with SMTP id j26-20020a170906051a00b0098225860f85mr14465473eja.65.1689148839953; Wed, 12 Jul 2023 01:00:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689148839; cv=none; d=google.com; s=arc-20160816; b=r2K+MMjeclL/VWUNiGF6TFf6wu5SF4fqKP0Z+3i3Ap7GKdjFurE8BeGeZz5PrfkyFP 3PrBGcSMgPv7tdNyulS/yg7OBUTka0FCIjowB1aBaibfdZFdpN611PvFRva+mhvdDCv6 gLsJL/+ascmTPmp2uFrExZY39rRh+Vt1oGHy105UTRllLBCeiNDPe/XYis/kk4jXlhvf wRGNlAKIZe7G6t6NK2WptZwiidlYnaDLw98WW1peHAom9+/YLMEgzlbJyCuEXsgrqxL5 gOaBekUcH0yP/+/LCbszdE3YBL5APZe5b6/z2LYEaU2Jq83ywZeB0Ill+MKJOS2hriyG U9Pw== 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=Xr6SCA0sZkk+kgDr9C2Ugn8MI7grTbNuIFF2Y8Jvxmw=; b=MfVLTd1VUTJyaRWgUezb4iD0E9p/oyI+chZfnQL+vgIt+ONepqCaajgKPJdDYQklTN 8/o7KdwAvey0t99fg5/7stQ+V9iZAx0edxLmjvfEAr4sQ+elKQryuO1cEWyuZEv+8wYU aLFFkZLoLD2iEFLg848pxsQGtLzmMIesWkBupedvZDZmCCGaxbm+ntT37TLVy/2z0kUx OI1DFA8Z20JQnNMUHc1M8PcQuElBp3CR8bEtyui9+euXAFsasIBD4UWaOwm+qgJLX+w4 C6x69b3XsJ5uMFRB0v2/MJF5whYmhGf5gBXO/TnpAfaCZh2jj9RtApL0jA1UAVRVfr+U zIZw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZlAl7rGg; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f12-20020a17090624cc00b00992af008f19si3754266ejb.972.2023.07.12.01.00.16; Wed, 12 Jul 2023 01:00:39 -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=ZlAl7rGg; 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 S229843AbjGLHtV (ORCPT + 99 others); Wed, 12 Jul 2023 03:49:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34698 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231136AbjGLHtR (ORCPT ); Wed, 12 Jul 2023 03:49:17 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C3421987 for ; Wed, 12 Jul 2023 00:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689148156; x=1720684156; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=4myecPwu5Ccazp290GdECvXjfGsVAVkoX8NsXNv5t8M=; b=ZlAl7rGgfkNG6voUNZFABF0rhIGrEhcsqQaRr8LN8NCdtQRpeRp6VJxn KCeuiZMppz7Qmqloe8/6RPdM7oF6YwkFe3sTGebtK97BvAHqkMztJBryt C+5eGEf3QI1wJQJ9+pLRKs6TlY37ixeJIrZNvUSe2PoZx10z/Kpl7ypP9 7DxpnoMbRM7HCBL4wsGMdgbMMxTPqc3w8V6P6TCjtz4IqXl41IZwPqLV7 vg+ViGCi8zZmJo0xc0YGNVppZ0A01RHdvW9wHkWvZ4Az0WuPGLB7W/5NO d/kZ6WksEhNXhTotCuQrndzT+KBVs5r+hMuzVRyRSVLy90j0MqppRihIz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="354734482" X-IronPort-AV: E=Sophos;i="6.01,199,1684825200"; d="scan'208";a="354734482" 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-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,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771200933597218653 X-GMAIL-MSGID: 1771200933597218653 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