From patchwork Tue Dec 11 01:02:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Keith Busch X-Patchwork-Id: 10722899 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 E9D43112E for ; Tue, 11 Dec 2018 01:05:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9DB62A0E6 for ; Tue, 11 Dec 2018 01:05:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CDC802A50D; Tue, 11 Dec 2018 01:05:47 +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=unavailable 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 6E5E32A0E6 for ; Tue, 11 Dec 2018 01:05:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3B28C8E0069; Mon, 10 Dec 2018 20:05:46 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3619B8E0018; Mon, 10 Dec 2018 20:05:46 -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 2518B8E0069; Mon, 10 Dec 2018 20:05:46 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by kanga.kvack.org (Postfix) with ESMTP id DA3ED8E0018 for ; Mon, 10 Dec 2018 20:05:45 -0500 (EST) Received: by mail-pl1-f200.google.com with SMTP id 12so9409143plb.18 for ; Mon, 10 Dec 2018 17:05:45 -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=fdjJCFRwYiRxQLLhdNwGLvHzT8RPY2I9c020t3G4oy4=; b=hZ9zBETZOtS7TMkSW1fej0QvpZBp5BYOt33GzCHCIy7Wll5o90idVQ1/fgqy3M1DhK Bti+dvoAe93uZtpisHUUS8dQlEXKTYHUsrrfI2ew2ZSMC/SK1gr0YoE/plcxQ+AerxSo 5tYsiLctErCf0xmFYBUe3xpslMktqC7llrwOgxvsQLshBqMmYDyYX3Vhz8HpOjNqkl4K o4fAAvNEeFoDeUgaDVuxbIUO+0E6+viTFvJTxU1P8CImTP3zosRDexPD0f4NQNXXWJjl oDxmvpINMjwSNXRcw6JCBodn674GQv+sy4k/lP+K3zpYMa7tWI7tJ55mCBTL34cvJEOS 9YTA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of keith.busch@intel.com designates 192.55.52.43 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: AA+aEWYtc4sVy5MFsPK15itscpxVBr9+l30aG+8SizjiYkAi7SWMU8Hy eNDRNd+kSijqrAM/JkJIuu76XGwN4Pw0jHwEHQ86vLHOWzMEktK3EjLhB9FsVFKXf9ll1yyTflI MLbiOiiw98DZKfJK7tgZ5+y9ukN7hwlDxhaVeijF16aQDjEQ0YCOl2Y6V3eWFNHcZ+Q== X-Received: by 2002:a65:58ca:: with SMTP id e10mr11685230pgu.99.1544490345410; Mon, 10 Dec 2018 17:05:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/XmiNZsNfSn5LB4+RO1Ie4FVOkMMlPHpXMcKNRin0aKXqM5GbRUlSnd8uOj20vi8mTEzYRW X-Received: by 2002:a65:58ca:: with SMTP id e10mr11685177pgu.99.1544490344269; Mon, 10 Dec 2018 17:05:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544490344; cv=none; d=google.com; s=arc-20160816; b=LWMWxSwYRs/3mqTAfvhUAffbvmBQJmL1hsjGFNRjWSj7oUJ5MFjszs+BKM6oh8OTUO LlAfhnfSnK5oaS8Gk/Vaw5H31Ygazd7q/qZhNYnRgL1GPupYvJUKfX7cN6qfV8Zjpclx TWpblymp7xnQbYmfCnU8kpJzB5wPzApVdRq/qXUp+6B5MVsYylmcjjy6GNoDW60WKVnY vkhN03D7SU8LOq/qEGsFnYHdhEWIkpK9vYaMdsef1DrBSldUa9/5lfdUtwaE0tKwH3DO EV9glNmAMk6qsxfpeSuRETYGl/gRq7B3fJcTkRS90rKTS4xDIUq2692CPg9IwO8ZT7n5 +r6A== 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=fdjJCFRwYiRxQLLhdNwGLvHzT8RPY2I9c020t3G4oy4=; b=XoQVCTVAmovlmWr1LWjvdg0qtfiz626TzoVLgqOkchOI0truGsLdQwKZaTkcmlBa+I m6HqMOYwMppdTCkAPBNkxUSuDrwBc2TF+pq+CD15oGHDfC69zCB54aJOUbfT6sqw0HW2 DB8u+QitsRzRDANF15NeM9golTg+HFuXG84S7VZLqH83zy7sEhYXYfcXQ1zWpDm9sX9x W5sKwdC3tphWL20uZQhZeuU+CNsCbYoCl8AZEA8aEknYE9c0XHQgYOoXM9FSXefRUHED /i9fycAiwmuTfbkslF0I5NfOW+j0nMjgdjwYbwh1kflOpU6xuX3vX9k5JWDXFy+2vd52 i5zg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of keith.busch@intel.com designates 192.55.52.43 as permitted sender) smtp.mailfrom=keith.busch@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga05.intel.com (mga05.intel.com. [192.55.52.43]) by mx.google.com with ESMTPS id i1si11402278pfj.276.2018.12.10.17.05.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 17:05:44 -0800 (PST) Received-SPF: pass (google.com: domain of keith.busch@intel.com designates 192.55.52.43 as permitted sender) client-ip=192.55.52.43; Authentication-Results: mx.google.com; spf=pass (google.com: domain of keith.busch@intel.com designates 192.55.52.43 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 orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Dec 2018 17:05:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,340,1539673200"; d="scan'208";a="117705161" Received: from unknown (HELO localhost.lm.intel.com) ([10.232.112.69]) by orsmga001.jf.intel.com with ESMTP; 10 Dec 2018 17:05:42 -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: [PATCHv2 00/12] Heterogeneous memory node attributes Date: Mon, 10 Dec 2018 18:02:58 -0700 Message-Id: <20181211010310.8551-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 Here is the second version for adding heterogeneous memory attributes to the existing node sysfs representation. 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. Changes since v1: Reordered the patches. The ACPI and bare-bones HMAT parsing come first. The kernel interfaces, documentation and in-kernel users follow. For correctness, have the new generic ACPI parsing and their callbacks use the acpi union header type instead of the common header. Added node masks in addition to the node symlinks for primary memory and cpu nodes. Altered the naming conventions to clearly indicate the attributes are for primary access and capture the relationship for the new access attributes to their primary nodes. Added Documentation/ABI. Used 'struct device' instead of kobject for memory side caches. Initialize HMAT with subsys_initcall instead of device_init. Combined the numa performance documentation into a single file and moved it to admin-guide/mm/. Changelogs updated with spelling/grammar/editorial fixes, and include additional examples. Keith Busch (12): acpi: Create subtable parsing infrastructure acpi/hmat: Parse and report heterogeneous memory node: Link memory nodes to their compute nodes Documentation/ABI: Add new node sysfs attributes acpi/hmat: Register processor domain to its memory node: Add heterogenous memory performance Documentation/ABI: Add node performance attributes acpi/hmat: Register performance attributes node: Add memory caching attributes Documentation/ABI: Add node cache attributes acpi/hmat: Register memory side cache attributes doc/mm: New documentation for memory performance Documentation/ABI/stable/sysfs-devices-node | 96 ++++++- Documentation/admin-guide/mm/numaperf.rst | 171 ++++++++++++ arch/x86/kernel/acpi/boot.c | 36 +-- drivers/acpi/Kconfig | 9 + drivers/acpi/Makefile | 1 + drivers/acpi/hmat.c | 393 ++++++++++++++++++++++++++++ drivers/acpi/numa.c | 16 +- drivers/acpi/scan.c | 4 +- drivers/acpi/tables.c | 76 +++++- drivers/base/Kconfig | 8 + drivers/base/node.c | 269 +++++++++++++++++++ drivers/irqchip/irq-gic-v3.c | 2 +- drivers/mailbox/pcc.c | 2 +- include/linux/acpi.h | 6 +- include/linux/node.h | 49 ++++ 15 files changed, 1096 insertions(+), 42 deletions(-) create mode 100644 Documentation/admin-guide/mm/numaperf.rst create mode 100644 drivers/acpi/hmat.c