From: Dan Williams <dan.j.williams@intel.com> To: linux-kernel@vger.kernel.org Cc: x86@kernel.org, Ard Biesheuvel <ard.biesheuvel@linaro.org>, Jonathan Cameron <Jonathan.Cameron@huawei.com>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, linux-mm@kvack.org, linux-nvdimm@lists.01.org, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, "H. Peter Anvin" <hpa@zytor.com>, Darren Hart <dvhart@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, Andy Shevchenko <andy@infradead.org>, Len Brown <lenb@kernel.org> Subject: [RFC PATCH 0/5] EFI Special Purpose Memory Support Date: Thu, 04 Apr 2019 12:08:28 -0700 [thread overview] Message-ID: <155440490809.3190322.15060922240602775809.stgit@dwillia2-desk3.amr.corp.intel.com> (raw) The EFI 2.8 Specification [1] introduces the EFI_MEMORY_SP ("special purpose") memory attribute. This attribute bit replaces the deprecated "reservation hint" that was introduced in ACPI 6.2 and removed in ACPI 6.3. Given the increasing diversity of memory types that might be advertised to the operating system, there is a need for platform firmware to hint which memory ranges are free for the OS to use as general purpose memory and which ranges are intended for application specific usage. For example, an application with prior knowledge of the platform may expect to be able to exclusively allocate a precious / limited pool of high bandwidth memory. Alternatively, for the general purpose case, the operating system may want to make the memory available on a best effort basis as a unique numa-node with performance properties by the new CONFIG_HMEM_REPORTING [2] facility. In support of allowing for both exclusive and core-kernel-mm managed access to differentiated memory, claim EFI_MEMORY_SP ranges for exposure as device-dax instances by default. Those instances can be directly owned / mapped by a platform-topology-aware application. However, with the new kmem facility [3], the administrator has the option to instead designate that those memory ranges be hot-added to the core-kernel-mm as a unique memory numa-node. In short, allow for the decision about what software agent manages special purpose memory to be made at runtime. The patches are based on v8 of Keith's "HMEM" series currently in Greg's driver-core-testing branch [4], and have not been tested. This is an RFC proposal on how to handle the new EFI memory attribute. [1]: https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf [2]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=driver-core-testing&id=b6efba75c449 [3]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c221c0b0308f [4]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/log/?h=driver-core-testing --- Dan Williams (5): efi: Detect UEFI 2.8 Special Purpose Memory lib/memregion: Uplevel the pmem "region" ida to a global allocator acpi/hmat: Track target address ranges acpi/hmat: Register special purpose memory as a device device-dax: Add a driver for "hmem" devices arch/x86/Kconfig | 18 +++++ arch/x86/boot/compressed/eboot.c | 5 + arch/x86/boot/compressed/kaslr.c | 2 - arch/x86/include/asm/e820/types.h | 9 ++ arch/x86/kernel/e820.c | 9 ++ arch/x86/platform/efi/efi.c | 10 ++- drivers/acpi/hmat/Kconfig | 1 drivers/acpi/hmat/hmat.c | 140 +++++++++++++++++++++++++++++++------ drivers/dax/Kconfig | 26 ++++++- drivers/dax/Makefile | 2 + drivers/dax/hmem.c | 58 +++++++++++++++ drivers/nvdimm/Kconfig | 1 drivers/nvdimm/core.c | 1 drivers/nvdimm/nd-core.h | 1 drivers/nvdimm/region_devs.c | 13 +-- include/linux/efi.h | 14 ++++ include/linux/ioport.h | 1 include/linux/memregion.h | 9 ++ lib/Kconfig | 6 ++ lib/Makefile | 1 lib/memregion.c | 22 ++++++ 21 files changed, 304 insertions(+), 45 deletions(-) create mode 100644 drivers/dax/hmem.c create mode 100644 include/linux/memregion.h create mode 100644 lib/memregion.c _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com> To: linux-kernel@vger.kernel.org Cc: Dave Jiang <dave.jiang@intel.com>, Keith Busch <keith.busch@intel.com>, Andy Shevchenko <andy@infradead.org>, Borislav Petkov <bp@alien8.de>, Vishal Verma <vishal.l.verma@intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Thomas Gleixner <tglx@linutronix.de>, Jonathan Cameron <Jonathan.Cameron@huawei.com>, Ingo Molnar <mingo@redhat.com>, Len Brown <lenb@kernel.org>, Darren Hart <dvhart@infradead.org>, Ard Biesheuvel <ard.biesheuvel@linaro.org>, "Rafael J. Wysocki" <rjw@rjwysocki.net>, x86@kernel.org, linux-mm@kvack.org, keith.busch@intel.com, vishal.l.verma@intel.com, linux-nvdimm@lists.01.org Subject: [RFC PATCH 0/5] EFI Special Purpose Memory Support Date: Thu, 04 Apr 2019 12:08:28 -0700 [thread overview] Message-ID: <155440490809.3190322.15060922240602775809.stgit@dwillia2-desk3.amr.corp.intel.com> (raw) The EFI 2.8 Specification [1] introduces the EFI_MEMORY_SP ("special purpose") memory attribute. This attribute bit replaces the deprecated "reservation hint" that was introduced in ACPI 6.2 and removed in ACPI 6.3. Given the increasing diversity of memory types that might be advertised to the operating system, there is a need for platform firmware to hint which memory ranges are free for the OS to use as general purpose memory and which ranges are intended for application specific usage. For example, an application with prior knowledge of the platform may expect to be able to exclusively allocate a precious / limited pool of high bandwidth memory. Alternatively, for the general purpose case, the operating system may want to make the memory available on a best effort basis as a unique numa-node with performance properties by the new CONFIG_HMEM_REPORTING [2] facility. In support of allowing for both exclusive and core-kernel-mm managed access to differentiated memory, claim EFI_MEMORY_SP ranges for exposure as device-dax instances by default. Those instances can be directly owned / mapped by a platform-topology-aware application. However, with the new kmem facility [3], the administrator has the option to instead designate that those memory ranges be hot-added to the core-kernel-mm as a unique memory numa-node. In short, allow for the decision about what software agent manages special purpose memory to be made at runtime. The patches are based on v8 of Keith's "HMEM" series currently in Greg's driver-core-testing branch [4], and have not been tested. This is an RFC proposal on how to handle the new EFI memory attribute. [1]: https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf [2]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=driver-core-testing&id=b6efba75c449 [3]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c221c0b0308f [4]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/log/?h=driver-core-testing --- Dan Williams (5): efi: Detect UEFI 2.8 Special Purpose Memory lib/memregion: Uplevel the pmem "region" ida to a global allocator acpi/hmat: Track target address ranges acpi/hmat: Register special purpose memory as a device device-dax: Add a driver for "hmem" devices arch/x86/Kconfig | 18 +++++ arch/x86/boot/compressed/eboot.c | 5 + arch/x86/boot/compressed/kaslr.c | 2 - arch/x86/include/asm/e820/types.h | 9 ++ arch/x86/kernel/e820.c | 9 ++ arch/x86/platform/efi/efi.c | 10 ++- drivers/acpi/hmat/Kconfig | 1 drivers/acpi/hmat/hmat.c | 140 +++++++++++++++++++++++++++++++------ drivers/dax/Kconfig | 26 ++++++- drivers/dax/Makefile | 2 + drivers/dax/hmem.c | 58 +++++++++++++++ drivers/nvdimm/Kconfig | 1 drivers/nvdimm/core.c | 1 drivers/nvdimm/nd-core.h | 1 drivers/nvdimm/region_devs.c | 13 +-- include/linux/efi.h | 14 ++++ include/linux/ioport.h | 1 include/linux/memregion.h | 9 ++ lib/Kconfig | 6 ++ lib/Makefile | 1 lib/memregion.c | 22 ++++++ 21 files changed, 304 insertions(+), 45 deletions(-) create mode 100644 drivers/dax/hmem.c create mode 100644 include/linux/memregion.h create mode 100644 lib/memregion.c
next reply other threads:[~2019-04-04 19:21 UTC|newest] Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-04-04 19:08 Dan Williams [this message] 2019-04-04 19:08 ` [RFC PATCH 0/5] EFI Special Purpose Memory Support Dan Williams 2019-04-04 19:08 ` [RFC PATCH 1/5] efi: Detect UEFI 2.8 Special Purpose Memory Dan Williams 2019-04-04 19:08 ` Dan Williams 2019-04-06 4:21 ` Ard Biesheuvel 2019-04-06 4:21 ` Ard Biesheuvel 2019-04-06 4:21 ` Ard Biesheuvel 2019-04-09 16:43 ` Dan Williams 2019-04-09 16:43 ` Dan Williams 2019-04-09 16:43 ` Dan Williams 2019-04-09 17:21 ` Ard Biesheuvel 2019-04-09 17:21 ` Ard Biesheuvel 2019-04-09 17:21 ` Ard Biesheuvel 2019-04-10 2:10 ` Dan Williams 2019-04-10 2:10 ` Dan Williams 2019-04-12 20:43 ` Ard Biesheuvel 2019-04-12 20:43 ` Ard Biesheuvel 2019-04-12 20:43 ` Ard Biesheuvel 2019-04-12 21:18 ` Dan Williams 2019-04-12 21:18 ` Dan Williams 2019-04-12 21:18 ` Dan Williams 2019-04-15 11:43 ` Enrico Weigelt, metux IT consult 2019-04-04 19:08 ` [RFC PATCH 2/5] lib/memregion: Uplevel the pmem "region" ida to a global allocator Dan Williams 2019-04-04 19:08 ` Dan Williams 2019-04-04 19:32 ` Matthew Wilcox 2019-04-04 21:02 ` Dan Williams 2019-04-04 21:02 ` Dan Williams 2019-04-04 21:02 ` Dan Williams 2019-04-04 19:08 ` [RFC PATCH 3/5] acpi/hmat: Track target address ranges Dan Williams 2019-04-04 19:08 ` Dan Williams 2019-04-04 20:58 ` Keith Busch 2019-04-04 20:58 ` Keith Busch 2019-04-04 20:58 ` Dan Williams 2019-04-04 20:58 ` Dan Williams 2019-04-04 20:58 ` Dan Williams 2019-04-04 19:08 ` [RFC PATCH 4/5] acpi/hmat: Register special purpose memory as a device Dan Williams 2019-04-04 19:08 ` Dan Williams 2019-04-05 11:18 ` Jonathan Cameron 2019-04-05 11:18 ` Jonathan Cameron 2019-04-05 15:43 ` Dan Williams 2019-04-05 15:43 ` Dan Williams 2019-04-05 15:43 ` Dan Williams 2019-04-05 16:23 ` Jonathan Cameron 2019-04-05 16:56 ` Dan Williams 2019-04-05 16:56 ` Dan Williams 2019-04-05 16:56 ` Dan Williams [not found] ` <CAPcyv4hxBFcJKbVVgNiE4UYXZS4XY9hfE8W9mN+VrcWS9AvJLw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2019-04-05 17:39 ` Jonathan Cameron 2019-04-05 17:39 ` Jonathan Cameron 2019-04-09 12:13 ` Christoph Hellwig 2019-04-09 12:13 ` Christoph Hellwig 2019-04-09 14:49 ` Dan Williams 2019-04-09 14:49 ` Dan Williams 2019-04-09 14:49 ` Dan Williams 2019-04-04 19:08 ` [RFC PATCH 5/5] device-dax: Add a driver for "hmem" devices Dan Williams 2019-04-04 19:08 ` Dan Williams
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=155440490809.3190322.15060922240602775809.stgit@dwillia2-desk3.amr.corp.intel.com \ --to=dan.j.williams@intel.com \ --cc=Jonathan.Cameron@huawei.com \ --cc=andy@infradead.org \ --cc=ard.biesheuvel@linaro.org \ --cc=bp@alien8.de \ --cc=dvhart@infradead.org \ --cc=hpa@zytor.com \ --cc=lenb@kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=linux-nvdimm@lists.01.org \ --cc=mingo@redhat.com \ --cc=rjw@rjwysocki.net \ --cc=tglx@linutronix.de \ --cc=x86@kernel.org \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.