Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7286001imu; Wed, 14 Nov 2018 14:54:30 -0800 (PST) X-Google-Smtp-Source: AJdET5dqpiBHsuGpsstqfWwCCtPJ4mgAzeGtTYlsz4xCXUQ3oviycdDN5ydH6hv+B/V+eQs78/SB X-Received: by 2002:a62:2095:: with SMTP id m21-v6mr3881366pfj.32.1542236070713; Wed, 14 Nov 2018 14:54:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542236070; cv=none; d=google.com; s=arc-20160816; b=wFWdHkaz76SjrQwLTAscfPhZnVuV//jOm6R+soAKe9qHi9GA+/ga1OTCnG2TR66KGX uH2POPEq1Jqkf+t9yfj21MBuZrhyrSf0lAS4dwCcx3156atrO6IIBbvhProJ2BfgVkJL uBZrqv+azBMqO+8IPkPNF34VxxBzeUHba2CEx0MjEBJ8TmMFaQJec+ofHIMtrjjdac4I WIQSCRZg7/YREQwWbXsYufr/uhfCJE90YFeHs8dTjjTnqwrM1Gv58BIyQWMHYSIPEOT5 3dVtH18iWiD61wciVTrFVxq+KRYXU1EwBUWpwjM7ZLdWQUo3sBjw68HDGUi6K3jMHgUk KWbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=kZPMrQy2nfA6gzJ9Y/qbpquyF/ltUnixCoh32oReZj8=; b=cxNJSvw7cwjE9QGKO1jgKLMuBYdrYfyQV9hXfii9EGxtOzdVdwQ8ksKrYYk4GJdzC7 xsqBvke8R89F3ZuxcJUaAIdoafBCfdNicvnaqadXVWPR0bTour2o6eP6xuIBztYI7GYe DHSjF6nKUHuhPBA0ay/fAwqEfXZMIu3eS2cAoUwoRGcZnKEW+A1YTg/uljk7hz/XeqKY M+XAdTpd2Kxz5t6Kj728qt2gQ3X/1mew6sSwz98PbDqZU4F+7AGSh7xs6CximDCNvAqx sdibOdgVLkbidTwVzRybyqwhKL/9nwFVNHeHGwcZqSNABfV0cE/rM3z8/AoA2b6IQb1O aItQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d33-v6si25966169pla.82.2018.11.14.14.54.16; Wed, 14 Nov 2018 14:54:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728147AbeKOI6T (ORCPT + 99 others); Thu, 15 Nov 2018 03:58:19 -0500 Received: from mga12.intel.com ([192.55.52.136]:50985 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727084AbeKOI6R (ORCPT ); Thu, 15 Nov 2018 03:58:17 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Nov 2018 14:53:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,234,1539673200"; d="scan'208";a="106314883" Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.69]) by fmsmga004.fm.intel.com with ESMTP; 14 Nov 2018 14:53:03 -0800 From: Keith Busch To: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org Cc: Greg Kroah-Hartman , Rafael Wysocki , Dave Hansen , Dan Williams , Keith Busch Subject: [PATCH 3/7] doc/vm: New documentation for memory performance Date: Wed, 14 Nov 2018 15:49:16 -0700 Message-Id: <20181114224921.12123-4-keith.busch@intel.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20181114224921.12123-2-keith.busch@intel.com> References: <20181114224921.12123-2-keith.busch@intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Platforms may provide system memory where some physical address ranges perform differently than others. These heterogeneous memory attributes are common to the node that provides the memory and exported by the kernel. Add new documentation providing a brief overview of such systems and the attributes the kernel makes available to aid applications wishing to query this information. Signed-off-by: Keith Busch --- Documentation/vm/numaperf.rst | 71 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/vm/numaperf.rst diff --git a/Documentation/vm/numaperf.rst b/Documentation/vm/numaperf.rst new file mode 100644 index 000000000000..5a3ecaff5474 --- /dev/null +++ b/Documentation/vm/numaperf.rst @@ -0,0 +1,71 @@ +.. _numaperf: + +================ +NUMA Performance +================ + +Some platforms may have multiple types of memory attached to a single +CPU. These disparate memory ranges share some characteristics, such as +CPU cache coherence, but may have different performance. For example, +different media types and buses affect bandwidth and latency. + +A system supporting such heterogeneous memory groups each memory type +under different "nodes" based on similar CPU locality and performance +characteristics. Some memory may share the same node as a CPU, and +others are provided as memory-only nodes. While memory only nodes do not +provide CPUs, they may still be local to one or more compute nodes. The +following diagram shows one such example of two compute noes with local +memory and a memory only node for each of compute node: + + +------------------+ +------------------+ + | Compute Node 0 +-----+ Compute Node 1 | + | Local Node0 Mem | | Local Node1 Mem | + +--------+---------+ +--------+---------+ + | | + +--------+---------+ +--------+---------+ + | Slower Node2 Mem | | Slower Node3 Mem | + +------------------+ +--------+---------+ + +A "memory initiator" is a node containing one or more devices such as +CPUs or separate memory I/O devices that can initiate memory requests. A +"memory target" is a node containing one or more CPU-accessible physical +address ranges. + +When multiple memory initiators exist, accessing the same memory +target may not perform the same as each other. The highest performing +initiator to a given target is considered to be one of that target's +local initiators. + +To aid applications matching memory targets with their initiators, +the kernel provide symlinks to each other like the following example:: + + # ls -l /sys/devices/system/node/nodeX/initiator* + /sys/devices/system/node/nodeX/targetY -> ../nodeY + + # ls -l /sys/devices/system/node/nodeY/target* + /sys/devices/system/node/nodeY/initiatorX -> ../nodeX + +Applications may wish to consider which node they want their memory to +be allocated from based on the nodes performance characteristics. If +the system provides these attributes, the kernel exports them under the +node sysfs hierarchy by appending the initiator_access directory under +the node as follows:: + + /sys/devices/system/node/nodeY/initiator_access/ + +The kernel does not provide performance attributes for non-local memory +initiators. The performance characteristics the kernel provides for +the local initiators are exported are as follows:: + + # tree /sys/devices/system/node/nodeY/initiator_access + /sys/devices/system/node/nodeY/initiator_access + |-- read_bandwidth + |-- read_latency + |-- write_bandwidth + `-- write_latency + +The bandwidth attributes are provided in MiB/second. + +The latency attributes are provided in nanoseconds. + +See also: https://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf -- 2.14.4