From patchwork Thu Jan 24 23:07:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 10780233 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3238A13BF for ; Thu, 24 Jan 2019 23:08:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F4962F552 for ; Thu, 24 Jan 2019 23:08:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1349F2F655; Thu, 24 Jan 2019 23:08:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E6782F552 for ; Thu, 24 Jan 2019 23:08:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E3E7C8E0094; Thu, 24 Jan 2019 18:08:25 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id DC64D8E0082; Thu, 24 Jan 2019 18:08:25 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C8D9D8E0094; Thu, 24 Jan 2019 18:08:25 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by kanga.kvack.org (Postfix) with ESMTP id 82DFF8E0082 for ; Thu, 24 Jan 2019 18:08:25 -0500 (EST) Received: by mail-pg1-f198.google.com with SMTP id o17so5013361pgi.14 for ; Thu, 24 Jan 2019 15:08:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id; bh=8IrhBZW91SZc1uEHUTZPwNp6jcMuInuo6UqQL3zEsk0=; b=oeEYAOoSJJkZxYpctHIJttwrnOTr43OyVh2KUECkatQqtC4Z8NflMElMkN1wcQiYMO KyFHXP9qs4h2YS8+EeGOepnkxOaDddED9E/4M6/3q/yHKgVwHwRywjvNnjM4gy0Q0YZd y2XYPzDf5r9wD1Jjwu3Jt/k0/H+pBGFjdPzpuxvW9RJ2gR+8cWs5WxDiyARWKeQzXfmY YzdiRdD1FOL2D8qmkxo5lt7dDZrCnw2jMfmjErLmyYv4WgyzQex/Io4fjeZwAeKeEmOL I3107AUrUQ5TpZNhkM8sJ/gZxkiFFhQegNaSXeVuzTJKJsee87Vf74XS+vxZz5hfx8o8 k/iA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of keith.busch@intel.com designates 192.55.52.136 as permitted sender) smtp.mailfrom=keith.busch@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: AJcUukfdj2/fKo2DRtL6oBD5gMHI/JX7oT49Q7znDv24XYToWUnK059l wIg4khXI31OTAtc1HPCWDW4Gfqgkj8GCgQjzn26IDcRf6bt+NvK3AschhCiiSJJ26H2LPGCPzRP Or18C56yl3FGfnifnFOOpP2wQPJXgq5lm2ZDzcsQ4X7Q7PToafxi9vjCUGeV58tin2Q== X-Received: by 2002:a17:902:fa2:: with SMTP id 31mr8525275plz.75.1548371305073; Thu, 24 Jan 2019 15:08:25 -0800 (PST) X-Google-Smtp-Source: ALg8bN5vzI11w9/jpIOrWAfxOLHYm75fRhhTwWwtRJ3B9s+nDniUWP2+rlqvmGtyeV5peJfDdUxg X-Received: by 2002:a17:902:fa2:: with SMTP id 31mr8525210plz.75.1548371303960; Thu, 24 Jan 2019 15:08:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548371303; cv=none; d=google.com; s=arc-20160816; b=vznP18ih6y6dqWMy0YzdSSgzTbW+NmEV6xEMAYst0EFqxjumlDlPx54nULz8E0w/PZ MnSNNSdOzCHdJcqoygazUqhMNTiPy3N12iCSXRiCj/wrX5ZmA7+HvNyQi2xCGc4xOmFA H1hPil41pJ2gxyxncDhu9yXWkXQFKMmAm1+DY4GccN7shR9ABsQGYlLtAdjwcYIEkrdF a7evWfes+Z7lBg0pZTX5E8N5QBHE0RS+QAM97dP7Kd+9usfk9n+wFG4+YUxn8XrJlLUF FoAGfo/sDUAWP2svNgxODUZW3Jqrq/z3oln4A8JtFHOhrtgFcJrgVuzMjiWbqAAwVJcw cgAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from; bh=8IrhBZW91SZc1uEHUTZPwNp6jcMuInuo6UqQL3zEsk0=; b=L5xhIRimqfsZIrS7K7r1CBTxU0ScgXksCSO7LK9tuETtgWfQ3QXQNHgr4WCo/ijk/X FYHtpSkc1UMs9xlDrVsEpml6A+Oyuh7k9gXvMWeAR6sBvgFjm2OWYEnJOXzNCnpD5I7p P5napPGA5gg46cajz56YGuPbi1Ni1Z+96f/5ed050+XBsjUeasMzrA5VkojNpJERW7sD JvMeuNtQzFSc7NwRnm7BFSUNC4IG2XsU/HikSjQxUCUjcPC72aFwy22o8yKPVWiQmf0V 08S+q6ntI1Zd5FTxX7jTGYO444U+HYxb8R0ZRJWfTbQdI4+iJiC2OfdD57GKZrLiwTUr VI0A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of keith.busch@intel.com designates 192.55.52.136 as permitted sender) smtp.mailfrom=keith.busch@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga12.intel.com (mga12.intel.com. [192.55.52.136]) by mx.google.com with ESMTPS id d69si8910713pga.184.2019.01.24.15.08.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jan 2019 15:08:23 -0800 (PST) Received-SPF: pass (google.com: domain of keith.busch@intel.com designates 192.55.52.136 as permitted sender) client-ip=192.55.52.136; Authentication-Results: mx.google.com; spf=pass (google.com: domain of keith.busch@intel.com designates 192.55.52.136 as permitted sender) smtp.mailfrom=keith.busch@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2019 15:08:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,518,1539673200"; d="scan'208";a="313295731" Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.69]) by fmsmga006.fm.intel.com with ESMTP; 24 Jan 2019 15:08:22 -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: [PATCHv5 00/10] Heterogeneuos memory node attributes Date: Thu, 24 Jan 2019 16:07:14 -0700 Message-Id: <20190124230724.10022-1-keith.busch@intel.com> X-Mailer: git-send-email 2.13.6 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: X-Virus-Scanned: ClamAV using ClamSMTP == Changes since v4 == All public interfaces have kernel docs. Renamed "class" to "access", docs and changed logs updated accordingly. (Rafael) The sysfs hierarchy is altered to put initiators and targets in their own attribute group directories (Rafael). The node lists are removed. This feedback is in conflict with v1 feedback, but consensus wants to remove multi-value sysfs attributes, which includes lists. We only have symlinks now, just like v1 provided. Documentation and code patches are combined such that the code introducing new attributes and its documentation are in the same patch. (Rafael and Dan). The performance attributes, bandwidth and latency, are moved into the initiators directory. This should make it obvious for which node access the attributes apply, which was previously ambiguous. (Jonathan Cameron). The HMAT code selecting "local" initiators is substantially changed. Only PXM's that have identical performance to the HMAT's processor PXM in Address Range Structure are registered. This is to avoid considering nodes identical when only one of several perf attributes are the same. (Jonathan Cameron). Verbose variable naming. Examples include "initiator" and "target" instead of "i" and "t", "mem_pxm" and "cpu_pxm" instead of "m" and "p". (Rafael) Compile fixes for when HMEM_REPORTING is not set. This is not a user selectable config option, default 'n', and will have to be selected by other config options that require it (Greg KH and Rafael). == Background == Platforms may provide multiple types of cpu attached system memory. The memory ranges for each type may have different characteristics that applications may wish to know about when considering what node they want their memory allocated from. It had previously been difficult to describe these setups as memory rangers were generally lumped into the NUMA node of the CPUs. New platform attributes have been created and in use today that describe the more complex memory hierarchies that can be created. This series' objective is to provide the attributes from such systems that are useful for applications to know about, and readily usable with existing tools and libraries. Keith Busch (10): acpi: Create subtable parsing infrastructure acpi: Add HMAT to generic parsing tables acpi/hmat: Parse and report heterogeneous memory node: Link memory nodes to their compute nodes acpi/hmat: Register processor domain to its memory node: Add heterogenous memory access attributes acpi/hmat: Register performance attributes node: Add memory caching attributes acpi/hmat: Register memory side cache attributes doc/mm: New documentation for memory performance Documentation/ABI/stable/sysfs-devices-node | 87 ++++- Documentation/admin-guide/mm/numaperf.rst | 167 ++++++++ arch/arm64/kernel/acpi_numa.c | 2 +- arch/arm64/kernel/smp.c | 4 +- arch/ia64/kernel/acpi.c | 12 +- arch/x86/kernel/acpi/boot.c | 36 +- drivers/acpi/Kconfig | 1 + drivers/acpi/Makefile | 1 + drivers/acpi/hmat/Kconfig | 9 + drivers/acpi/hmat/Makefile | 1 + drivers/acpi/hmat/hmat.c | 537 ++++++++++++++++++++++++++ drivers/acpi/numa.c | 16 +- drivers/acpi/scan.c | 4 +- drivers/acpi/tables.c | 76 +++- drivers/base/Kconfig | 8 + drivers/base/node.c | 354 ++++++++++++++++- drivers/irqchip/irq-gic-v2m.c | 2 +- drivers/irqchip/irq-gic-v3-its-pci-msi.c | 2 +- drivers/irqchip/irq-gic-v3-its-platform-msi.c | 2 +- drivers/irqchip/irq-gic-v3-its.c | 6 +- drivers/irqchip/irq-gic-v3.c | 10 +- drivers/irqchip/irq-gic.c | 4 +- drivers/mailbox/pcc.c | 2 +- include/linux/acpi.h | 6 +- include/linux/node.h | 60 ++- 25 files changed, 1344 insertions(+), 65 deletions(-) create mode 100644 Documentation/admin-guide/mm/numaperf.rst create mode 100644 drivers/acpi/hmat/Kconfig create mode 100644 drivers/acpi/hmat/Makefile create mode 100644 drivers/acpi/hmat/hmat.c