mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-01 16:14:13 +08:00
a6c7f4c6ae
Platform firmware like EFI/ACPI may publish "hmem" platform devices. Such a device is a performance differentiated memory range likely reserved for an application specific use case. The driver gives access to 100% of the capacity via a device-dax mmap instance by default. However, if over-subscription and other kernel memory management is desired the resulting dax device can be assigned to the core-mm via the kmem driver. This consumes "hmem" devices the producer of "hmem" devices is saved for a follow-on patch so that it can reference the new CONFIG_DEV_DAX_HMEM symbol to gate performing the enumeration work. Reported-by: kbuild test robot <lkp@intel.com> Reviewed-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
78 lines
2.5 KiB
Plaintext
78 lines
2.5 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config DAX_DRIVER
|
|
select DAX
|
|
bool
|
|
|
|
menuconfig DAX
|
|
tristate "DAX: direct access to differentiated memory"
|
|
select SRCU
|
|
default m if NVDIMM_DAX
|
|
|
|
if DAX
|
|
|
|
config DEV_DAX
|
|
tristate "Device DAX: direct access mapping device"
|
|
depends on TRANSPARENT_HUGEPAGE
|
|
help
|
|
Support raw access to differentiated (persistence, bandwidth,
|
|
latency...) memory via an mmap(2) capable character
|
|
device. Platform firmware or a device driver may identify a
|
|
platform memory resource that is differentiated from the
|
|
baseline memory pool. Mappings of a /dev/daxX.Y device impose
|
|
restrictions that make the mapping behavior deterministic.
|
|
|
|
config DEV_DAX_PMEM
|
|
tristate "PMEM DAX: direct access to persistent memory"
|
|
depends on LIBNVDIMM && NVDIMM_DAX && DEV_DAX
|
|
default DEV_DAX
|
|
help
|
|
Support raw access to persistent memory. Note that this
|
|
driver consumes memory ranges allocated and exported by the
|
|
libnvdimm sub-system.
|
|
|
|
Say M if unsure
|
|
|
|
config DEV_DAX_HMEM
|
|
tristate "HMEM DAX: direct access to 'specific purpose' memory"
|
|
depends on EFI_SOFT_RESERVE
|
|
default DEV_DAX
|
|
help
|
|
EFI 2.8 platforms, and others, may advertise 'specific purpose'
|
|
memory. For example, a high bandwidth memory pool. The
|
|
indication from platform firmware is meant to reserve the
|
|
memory from typical usage by default. This driver creates
|
|
device-dax instances for these memory ranges, and that also
|
|
enables the possibility to assign them to the DEV_DAX_KMEM
|
|
driver to override the reservation and add them to kernel
|
|
"System RAM" pool.
|
|
|
|
Say M if unsure.
|
|
|
|
config DEV_DAX_KMEM
|
|
tristate "KMEM DAX: volatile-use of persistent memory"
|
|
default DEV_DAX
|
|
depends on DEV_DAX
|
|
depends on MEMORY_HOTPLUG # for add_memory() and friends
|
|
help
|
|
Support access to persistent, or other performance
|
|
differentiated memory as if it were System RAM. This allows
|
|
easier use of persistent memory by unmodified applications, or
|
|
adds core kernel memory services to heterogeneous memory types
|
|
(HMEM) marked "reserved" by platform firmware.
|
|
|
|
To use this feature, a DAX device must be unbound from the
|
|
device_dax driver and bound to this kmem driver on each boot.
|
|
|
|
Say N if unsure.
|
|
|
|
config DEV_DAX_PMEM_COMPAT
|
|
tristate "PMEM DAX: support the deprecated /sys/class/dax interface"
|
|
depends on m && DEV_DAX_PMEM=m
|
|
default DEV_DAX_PMEM
|
|
help
|
|
Older versions of the libdaxctl library expect to find all
|
|
device-dax instances under /sys/class/dax. If libdaxctl in
|
|
your distribution is older than v58 say M, otherwise say N.
|
|
|
|
endif
|