From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Ross Zwisler <ross.zwisler@linux.intel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"Anaczkowski, Lukasz" <lukasz.anaczkowski@intel.com>,
"Box, David E" <david.e.box@intel.com>,
"Kogut, Jaroslaw" <Jaroslaw.Kogut@intel.com>,
"Koss, Marcin" <marcin.koss@intel.com>,
"Koziej, Artur" <artur.koziej@intel.com>,
"Lahtinen, Joonas" <joonas.lahtinen@intel.com>,
"Moore, Robert" <robert.moore@intel.com>,
"Nachimuthu, Murugasamy" <murugasamy.nachimuthu@intel.com>,
"Odzioba, Lukasz" <lukasz.odzioba@intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"Schmauss, Erik" <erik.schmauss@intel.com>,
"Verma, Vishal L" <vishal.l.verma@intel.com>,
"Zheng, Lv" <lv.zheng@intel.com>,
Andrew Morton <akpm@linux-foundation.org>,
Balbir Singh <bsingharora@gmail.com>,
Brice Goglin <brice.goglin@gmail.com>,
Dan Williams <dan.j.williams@intel.com>,
Dave Hansen <dave.hansen@intel.com>,
Jerome Glisse <jglisse@redhat.com>,
John Hubbard <jhubbard@nvidia.com>, Len Brown <lenb@kernel.org>,
Tim Chen <tim.c.chen@linux.intel.com>,
devel@acpica.org,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux Memory Management List <linux-mm@kvack.org>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>
Subject: Re: [PATCH v3 2/3] hmat: add heterogeneous memory sysfs support
Date: Fri, 15 Dec 2017 01:52:03 +0100 [thread overview]
Message-ID: <CAJZ5v0h8=mh9BKa2eZzqbc12T6saB+q19yqSfRLYKOiUjS2Cjg@mail.gmail.com> (raw)
In-Reply-To: <20171214021019.13579-3-ross.zwisler@linux.intel.com>
On Thu, Dec 14, 2017 at 3:10 AM, Ross Zwisler
<ross.zwisler@linux.intel.com> wrote:
> Add a new sysfs subsystem, /sys/devices/system/hmat, which surfaces
> information about memory initiators and memory targets to the user. These
> initiators and targets are described by the ACPI SRAT and HMAT tables.
>
> A "memory initiator" in this case is a NUMA node containing one or more
> devices such as CPU or separate memory I/O devices that can initiate
> memory requests. A "memory target" is NUMA node containing at least one
> CPU-accessible physical address range.
>
> The key piece of information surfaced by this patch is the mapping between
> the ACPI table "proximity domain" numbers, held in the "firmware_id"
> attribute, and Linux NUMA node numbers. Every ACPI proximity domain will
> end up being a unique NUMA node in Linux, but the numbers may get reordered
> and Linux can create extra NUMA nodes that don't map back to ACPI proximity
> domains. The firmware_id value is needed if anyone ever wants to look at
> the ACPI HMAT and SRAT tables directly and make sense of how they map to
> NUMA nodes in Linux.
>
> Initiators are found at /sys/devices/system/hmat/mem_initX, and the
> attributes for a given initiator look like this:
>
> # tree mem_init0
> mem_init0
> ├── firmware_id
> ├── node0 -> ../../node/node0
> ├── power
> │ ├── async
> │ ...
> ├── subsystem -> ../../../../bus/hmat
> └── uevent
>
> Where "mem_init0" on my system represents the CPU acting as a memory
> initiator at NUMA node 0. Users can discover which CPUs are part of this
> memory initiator by following the node0 symlink and looking at cpumap,
> cpulist and the cpu* symlinks.
>
> Targets are found at /sys/devices/system/hmat/mem_tgtX, and the attributes
> for a given target look like this:
>
> # tree mem_tgt2
> mem_tgt2
> ├── firmware_id
> ├── is_cached
> ├── node2 -> ../../node/node2
> ├── power
> │ ├── async
> │ ...
> ├── subsystem -> ../../../../bus/hmat
> └── uevent
>
> Users can discover information about the memory owned by this memory target
> by following the node2 symlink and looking at meminfo, vmstat and at the
> memory* memory section symlinks.
>
> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
> ---
> MAINTAINERS | 6 +
> drivers/acpi/Kconfig | 1 +
> drivers/acpi/Makefile | 1 +
> drivers/acpi/hmat/Kconfig | 7 +
> drivers/acpi/hmat/Makefile | 2 +
> drivers/acpi/hmat/core.c | 536 ++++++++++++++++++++++++++++++++++++++++++
> drivers/acpi/hmat/hmat.h | 47 ++++
> drivers/acpi/hmat/initiator.c | 43 ++++
> drivers/acpi/hmat/target.c | 55 +++++
> 9 files changed, 698 insertions(+)
> create mode 100644 drivers/acpi/hmat/Kconfig
> create mode 100644 drivers/acpi/hmat/Makefile
> create mode 100644 drivers/acpi/hmat/core.c
> create mode 100644 drivers/acpi/hmat/hmat.h
> create mode 100644 drivers/acpi/hmat/initiator.c
> create mode 100644 drivers/acpi/hmat/target.c
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 82ad0eabce4f..64ebec0708de 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -6366,6 +6366,12 @@ S: Supported
> F: drivers/scsi/hisi_sas/
> F: Documentation/devicetree/bindings/scsi/hisilicon-sas.txt
>
> +HMAT - ACPI Heterogeneous Memory Attribute Table Support
> +M: Ross Zwisler <ross.zwisler@linux.intel.com>
> +L: linux-mm@kvack.org
> +S: Supported
> +F: drivers/acpi/hmat/
> +
> HMM - Heterogeneous Memory Management
> M: Jérôme Glisse <jglisse@redhat.com>
> L: linux-mm@kvack.org
> diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
> index 46505396869e..21cdd1288430 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -466,6 +466,7 @@ config ACPI_REDUCED_HARDWARE_ONLY
> If you are unsure what to do, do not enable this option.
>
> source "drivers/acpi/nfit/Kconfig"
> +source "drivers/acpi/hmat/Kconfig"
>
> source "drivers/acpi/apei/Kconfig"
> source "drivers/acpi/dptf/Kconfig"
> diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
> index 41954a601989..ed5eab6b0412 100644
> --- a/drivers/acpi/Makefile
> +++ b/drivers/acpi/Makefile
> @@ -75,6 +75,7 @@ obj-$(CONFIG_ACPI_PROCESSOR) += processor.o
> obj-$(CONFIG_ACPI) += container.o
> obj-$(CONFIG_ACPI_THERMAL) += thermal.o
> obj-$(CONFIG_ACPI_NFIT) += nfit/
> +obj-$(CONFIG_ACPI_HMAT) += hmat/
> obj-$(CONFIG_ACPI) += acpi_memhotplug.o
> obj-$(CONFIG_ACPI_HOTPLUG_IOAPIC) += ioapic.o
> obj-$(CONFIG_ACPI_BATTERY) += battery.o
> diff --git a/drivers/acpi/hmat/Kconfig b/drivers/acpi/hmat/Kconfig
> new file mode 100644
> index 000000000000..954ad4701005
> --- /dev/null
> +++ b/drivers/acpi/hmat/Kconfig
> @@ -0,0 +1,7 @@
> +config ACPI_HMAT
> + bool "ACPI Heterogeneous Memory Attribute Table Support"
> + depends on ACPI_NUMA
> + depends on SYSFS
> + help
> + Exports a sysfs representation of the ACPI Heterogeneous Memory
> + Attributes Table (HMAT).
> diff --git a/drivers/acpi/hmat/Makefile b/drivers/acpi/hmat/Makefile
> new file mode 100644
> index 000000000000..edf4bcb1c97d
> --- /dev/null
> +++ b/drivers/acpi/hmat/Makefile
> @@ -0,0 +1,2 @@
> +obj-$(CONFIG_ACPI_HMAT) := hmat.o
> +hmat-y := core.o initiator.o target.o
> diff --git a/drivers/acpi/hmat/core.c b/drivers/acpi/hmat/core.c
> new file mode 100644
> index 000000000000..61b90dadf84b
> --- /dev/null
> +++ b/drivers/acpi/hmat/core.c
> @@ -0,0 +1,536 @@
> +/*
> + * Heterogeneous Memory Attributes Table (HMAT) representation in sysfs
> + *
> + * Copyright (c) 2017, Intel Corporation.
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope it will be useful, but WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
> + * more details.
> + */
Minor nit for starters: you should use SPDX license indentifiers in
new files and if you do so, the license boilerplace is not necessary
any more.
Thanks,
Rafael
next prev parent reply other threads:[~2017-12-15 0:52 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-14 2:10 [PATCH v3 0/3] create sysfs representation of ACPI HMAT Ross Zwisler
2017-12-14 2:10 ` [PATCH v3 1/3] acpi: HMAT support in acpi_parse_entries_array() Ross Zwisler
2017-12-15 0:49 ` Rafael J. Wysocki
2017-12-15 1:10 ` Dan Williams
2017-12-16 1:53 ` Rafael J. Wysocki
2017-12-16 1:57 ` Dan Williams
2017-12-16 2:15 ` Rafael J. Wysocki
2017-12-14 2:10 ` [PATCH v3 2/3] hmat: add heterogeneous memory sysfs support Ross Zwisler
2017-12-15 0:52 ` Rafael J. Wysocki [this message]
2017-12-15 20:53 ` Ross Zwisler
2017-12-14 2:10 ` [PATCH v3 3/3] hmat: add performance attributes Ross Zwisler
2017-12-14 13:00 ` [PATCH v3 0/3] create sysfs representation of ACPI HMAT Michal Hocko
2017-12-18 20:35 ` Ross Zwisler
2017-12-20 16:41 ` Ross Zwisler
2017-12-21 13:18 ` Michal Hocko
2017-12-20 18:19 ` Matthew Wilcox
2017-12-20 20:22 ` Dave Hansen
2017-12-20 21:16 ` Matthew Wilcox
2017-12-20 21:24 ` Ross Zwisler
2017-12-20 22:29 ` Dan Williams
2017-12-20 22:41 ` Ross Zwisler
2017-12-21 20:31 ` Brice Goglin
2017-12-22 22:53 ` Dan Williams
2017-12-22 23:22 ` Ross Zwisler
2017-12-22 23:57 ` Dan Williams
2017-12-23 1:14 ` Rafael J. Wysocki
2017-12-27 9:10 ` Brice Goglin
2017-12-30 6:58 ` Matthew Wilcox
2017-12-30 9:19 ` Brice Goglin
2017-12-20 21:13 ` Ross Zwisler
2017-12-21 1:41 ` Elliott, Robert (Persistent Memory)
2017-12-22 21:46 ` Ross Zwisler
2017-12-21 12:50 ` Michael Ellerman
2017-12-22 3:09 ` Anshuman Khandual
2017-12-22 10:31 ` Kogut, Jaroslaw
2017-12-22 14:37 ` Anshuman Khandual
2017-12-22 17:13 ` Dave Hansen
2017-12-23 5:14 ` Anshuman Khandual
2017-12-22 22:13 ` Ross Zwisler
2017-12-23 6:56 ` Anshuman Khandual
2017-12-22 22:31 ` Ross Zwisler
2017-12-25 2:05 ` Liubo(OS Lab)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAJZ5v0h8=mh9BKa2eZzqbc12T6saB+q19yqSfRLYKOiUjS2Cjg@mail.gmail.com' \
--to=rafael@kernel.org \
--cc=Jaroslaw.Kogut@intel.com \
--cc=akpm@linux-foundation.org \
--cc=artur.koziej@intel.com \
--cc=brice.goglin@gmail.com \
--cc=bsingharora@gmail.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@intel.com \
--cc=david.e.box@intel.com \
--cc=devel@acpica.org \
--cc=erik.schmauss@intel.com \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=joonas.lahtinen@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=lukasz.anaczkowski@intel.com \
--cc=lukasz.odzioba@intel.com \
--cc=lv.zheng@intel.com \
--cc=marcin.koss@intel.com \
--cc=murugasamy.nachimuthu@intel.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rjw@rjwysocki.net \
--cc=robert.moore@intel.com \
--cc=ross.zwisler@linux.intel.com \
--cc=tim.c.chen@linux.intel.com \
--cc=vishal.l.verma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).