[PATCH 0/3 v1] dax: Clear dirty bits after flushing caches
by Jan Kara
Hello,
currently we never clear dirty bits in the radix tree of a DAX inode. Thus
fsync(2) or even periodical writeback flush all the dirty pfns again and
again. This patches implement clearing of the dirty tag in the radix tree
so that we issue flush only when needed.
The difficulty with clearing the dirty tag is that we have to protect against
a concurrent page fault setting the dirty tag and writing new data into the
page. So we need a lock serializing page fault and clearing of the dirty tag
and write-protecting PTEs (so that we get another pagefault when pfn is written
to again and we have to set the dirty tag again).
The effect of the patch set is easily visible:
Writing 1 GB of data via mmap, then fsync twice.
Before this patch set both fsyncs take ~205 ms on my test machine, after the
patch set the first fsync takes ~283 ms (the additional cost of walking PTEs,
clearing dirty bits etc. is very noticeable), the second fsync takes below
1 us.
As a bonus, these patches make filesystem freezing for DAX filesystems
reliable because mappings are now properly writeprotected while freezing the
fs.
Patches have passed xfstests for both xfs and ext4.
So far the patches don't work with PMD pages - that's next on my todo list.
Honza
4 years, 8 months
[PATCH 0/2] Support DAX for device-mapper dm-linear devices
by Toshi Kani
I noticed that dm-snap reloads DM table of target mapped-device, which
fails for dax-capable device after dax support is added. Ideally,
adding dax support to dm-snap solves the issue, but it cannot be done
easily. This patch-set allows dm-snap to work with dax-capable target
devices when bio-based operation is used.
dax operation is unsupported with dm-snap, such that:
a) After snapshot is taken, mount with dax option to a target device
or a snapshot device fails. They can be mounted without dax.
b) After snapshot is taken to a dax-mounted target device, any writes
to the target device fails (EIO).
b) can be protected by changing lvcreate to fail when snapshot is
requested to a dax-mounted target device.
- Patch 1 solves an error when lvremove is made to a snapshot device.
- Patch 2 solves an error when lvcreate --snapshot is made to a dax-
capable device.
---
Toshi Kani (2):
1/2 dm: update table type check for dax
2/2 dm snap: add fake origin_direct_access
---
drivers/md/dm-ioctl.c | 11 ++++++++++-
drivers/md/dm-snap.c | 8 ++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
4 years, 8 months
[RESEND PATCH] x86/mm: only allow memmap=XX!YY over existing RAM
by Yigal Korman
Before this patch, passing a range that is beyond the physical memory
range will succeed, the user will see a /dev/pmem0 and will be able to
access it. Reads will always return 0 and writes will be silently
ignored.
I've gotten more than one bug report about mkfs.{xfs,ext4} or nvml
failing that were eventually tracked down to be wrong values passed to
memmap.
This patch prevents the above issue by instead of adding a new memory
range, only update a RAM memory range with the PRAM type. This way,
passing the wrong memmap will either not give you a pmem at all or give
you a smaller one that actually has RAM behind it.
And if someone still needs to fake a pmem that doesn't have RAM behind
it, they can simply do memmap=XX@YY,XX!YY.
Signed-off-by: Yigal Korman <yigal(a)plexistor.com>
Acked-by: Dan Williams <dan.j.williams(a)intel.com>
Acked-by: Johannes Thumshirn <jthumshirn(a)suse.de>
Tested-by: Boaz Harrosh <boaz(a)plexistor.com>
---
arch/x86/kernel/e820.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index 621b501..4bd4207 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -878,7 +878,7 @@ static int __init parse_memmap_one(char *p)
e820_add_region(start_at, mem_size, E820_RESERVED);
} else if (*p == '!') {
start_at = memparse(p+1, &p);
- e820_add_region(start_at, mem_size, E820_PRAM);
+ e820_update_range(start_at, mem_size, E820_RAM, E820_PRAM);
} else
e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
--
1.9.3
4 years, 8 months
[PATCH v4] acpi, nfit: treat virtual ramdisk SPA as pmem region
by Lee, Chun-Yi
This patch adds logic to treat virtual ramdisk SPA as pmem region, then
ramdisk's /dev/pmem* device can be mounted with iso9660.
It's useful to work with the httpboot in EFI firmware to pull a remote
ISO file to the local memory region for booting and installation.
Wiki page of UEFI HTTPBoot with OVMF:
https://en.opensuse.org/UEFI_HTTPBoot_with_OVMF
The ramdisk function in EDK2/OVMF generates a ACPI0012 root device that
it contains empty _STA but without _DSM:
DefinitionBlock ("ssdt2.aml", "SSDT", 2, "INTEL ", "RamDisk ", 0x00001000)
{
Scope (\_SB)
{
Device (NVDR)
{
Name (_HID, "ACPI0012") // _HID: Hardware ID
Name (_STR, Unicode ("NVDIMM Root Device")) // _STR: Description String
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (0x0F)
}
}
}
}
In section 5.2.25.2 of ACPI 6.1 spec, it mentions that the "SPA Range
Structure Index" of virtual SPA shall be set to zero. That means virtual SPA
will not be associated by any NVDIMM region mapping.
The VCD's SPA Range Structure in NFIT is similar to virtual disk region
as following:
[028h 0040 2] Subtable Type : 0000 [System Physical Address Range]
[02Ah 0042 2] Length : 0038
[02Ch 0044 2] Range Index : 0000
[02Eh 0046 2] Flags (decoded below) : 0000
Add/Online Operation Only : 0
Proximity Domain Valid : 0
[030h 0048 4] Reserved : 00000000
[034h 0052 4] Proximity Domain : 00000000
[038h 0056 16] Address Range GUID : 77AB535A-45FC-624B-5560-F7B281D1F96E
[048h 0072 8] Address Range Base : 00000000B6ABD018
[050h 0080 8] Address Range Length : 0000000005500000
[058h 0088 8] Memory Map Attribute : 0000000000000000
The way to not associate a SPA range is to never reference it from a "flush hint",
"interleave", or "control region" table.
After testing on OVMF, pmem driver can support the region that it doesn't
assoicate to any NVDIMM mapping. So, treat VCD like pmem is a idea to get
a pmem block device that it contains iso.
v4:
Instoduce nfit_spa_is_virtual() to check virtual ramdisk SPA and create
pmem region.
v3:
To simplify patch, removed useless VCD region in libnvdimm.
v2:
Removed the code for setting VCD to a read-only region.
Cc: Gary Lin <GLin(a)suse.com>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Cc: Ross Zwisler <ross.zwisler(a)linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw(a)rjwysocki.net>
Cc: Linda Knippers <linda.knippers(a)hpe.com>
Signed-off-by: Lee, Chun-Yi <jlee(a)suse.com>
---
drivers/acpi/nfit.c | 8 +++++++-
drivers/nvdimm/region_devs.c | 26 +++++++++++++++++++++++++-
include/linux/libnvdimm.h | 2 ++
3 files changed, 34 insertions(+), 2 deletions(-)
Index: linux/drivers/acpi/nfit.c
===================================================================
--- linux.orig/drivers/acpi/nfit.c
+++ linux/drivers/acpi/nfit.c
@@ -1980,6 +1980,14 @@ static int acpi_nfit_init_mapping(struct
return 0;
}
+static bool nfit_spa_is_virtual(struct acpi_nfit_system_address *spa)
+{
+ return (nfit_spa_type(spa) == NFIT_SPA_VDISK ||
+ nfit_spa_type(spa) == NFIT_SPA_VCD ||
+ nfit_spa_type(spa) == NFIT_SPA_PDISK ||
+ nfit_spa_type(spa) == NFIT_SPA_PCD);
+}
+
static int acpi_nfit_register_region(struct acpi_nfit_desc *acpi_desc,
struct nfit_spa *nfit_spa)
{
@@ -1995,7 +2003,7 @@ static int acpi_nfit_register_region(str
if (nfit_spa->nd_region)
return 0;
- if (spa->range_index == 0) {
+ if (spa->range_index == 0 && !nfit_spa_is_virtual(spa)) {
dev_dbg(acpi_desc->dev, "%s: detected invalid spa index\n",
__func__);
return 0;
@@ -2059,6 +2067,11 @@ static int acpi_nfit_register_region(str
ndr_desc);
if (!nfit_spa->nd_region)
rc = -ENOMEM;
+ } else if (nfit_spa_is_virtual(spa)) {
+ nfit_spa->nd_region = nvdimm_pmem_region_create(nvdimm_bus,
+ ndr_desc);
+ if (!nfit_spa->nd_region)
+ rc = -ENOMEM;
}
out:
4 years, 8 months
[PATCH v3] acpi, nfit: treat volatile virtual CD region as pmem
by Lee, Chun-Yi
This patch adds logic to treat volatile virtual CD region as pmem
region, then /dev/pmem* device can be mounted with iso9660.
It's useful to work with the httpboot in EFI firmware to pull a remote
ISO file to the local memory region for booting and installation.
Wiki page of UEFI HTTPBoot with OVMF:
https://en.opensuse.org/UEFI_HTTPBoot_with_OVMF
The ramdisk function in EDK2/OVMF generates a ACPI0012 root device that
it contains empty _STA but without _DSM:
DefinitionBlock ("ssdt2.aml", "SSDT", 2, "INTEL ", "RamDisk ", 0x00001000)
{
Scope (\_SB)
{
Device (NVDR)
{
Name (_HID, "ACPI0012") // _HID: Hardware ID
Name (_STR, Unicode ("NVDIMM Root Device")) // _STR: Description String
Method (_STA, 0, NotSerialized) // _STA: Status
{
Return (0x0F)
}
}
}
}
In section 5.2.25.2 of ACPI 6.1 spec, it mentions that the "SPA Range
Structure Index" of VCD SPA shall be set to zero. That means VCD SPA
will not be associated by any NVDIMM region mapping.
The VCD's SPA Range Structure in NFIT is similar to virtual disk region
as following:
[028h 0040 2] Subtable Type : 0000 [System Physical Address Range]
[02Ah 0042 2] Length : 0038
[02Ch 0044 2] Range Index : 0000
[02Eh 0046 2] Flags (decoded below) : 0000
Add/Online Operation Only : 0
Proximity Domain Valid : 0
[030h 0048 4] Reserved : 00000000
[034h 0052 4] Proximity Domain : 00000000
[038h 0056 16] Address Range GUID : 77AB535A-45FC-624B-5560-F7B281D1F96E
[048h 0072 8] Address Range Base : 00000000B6ABD018
[050h 0080 8] Address Range Length : 0000000005500000
[058h 0088 8] Memory Map Attribute : 0000000000000000
The way to not associate a SPA range is to never reference it from a "flush hint",
"interleave", or "control region" table.
After testing on OVMF, pmem driver can support the region that it doesn't
assoicate to any NVDIMM mapping. So, treat VCD like pmem is a idea to get
a pmem block device that it contains iso.
v3:
To simplify patch, removed VCD region in libnvdimm.
v2:
Removed the code for setting VCD to a read-only region.
Cc: Gary Lin <GLin(a)suse.com>
Cc: Dan Williams <dan.j.williams(a)intel.com>
Cc: Ross Zwisler <ross.zwisler(a)linux.intel.com>
Cc: "Rafael J. Wysocki" <rjw(a)rjwysocki.net>
Cc: Linda Knippers <linda.knippers(a)hpe.com>
Signed-off-by: Lee, Chun-Yi <jlee(a)suse.com>
---
drivers/acpi/nfit.c | 8 +++++++-
drivers/nvdimm/region_devs.c | 26 +++++++++++++++++++++++++-
include/linux/libnvdimm.h | 2 ++
3 files changed, 34 insertions(+), 2 deletions(-)
Index: linux/drivers/acpi/nfit.c
===================================================================
--- linux.orig/drivers/acpi/nfit.c
+++ linux/drivers/acpi/nfit.c
@@ -1995,7 +1995,7 @@ static int acpi_nfit_register_region(str
if (nfit_spa->nd_region)
return 0;
- if (spa->range_index == 0) {
+ if (spa->range_index == 0 && nfit_spa_type(spa) != NFIT_SPA_VCD) {
dev_dbg(acpi_desc->dev, "%s: detected invalid spa index\n",
__func__);
return 0;
@@ -2059,6 +2059,11 @@ static int acpi_nfit_register_region(str
ndr_desc);
if (!nfit_spa->nd_region)
rc = -ENOMEM;
+ } else if (nfit_spa_type(spa) == NFIT_SPA_VCD) {
+ nfit_spa->nd_region = nvdimm_pmem_region_create(nvdimm_bus,
+ ndr_desc);
+ if (!nfit_spa->nd_region)
+ rc = -ENOMEM;
}
out:
4 years, 8 months
[ndctl PATCH 0/9] updates for vmalloc-based nfit_test and device-dax
by Dan Williams
The kernel is moving from CMA to vmalloc() backed resources to expand
the range of kernels that the tests can be compiled against. As a
result some of the huge page tests need to move from nfit_test to
memmap=ss!nn defined memory ranges.
The new device-dax test exposed some bugs and missing capabilities in
the 'create-namespace' and 'list' commands.
---
Dan Williams (9):
ndctl: deprecate pcommit
test, libndctl: invalidate dax info blocks before reuse
ndctl, list: list device-dax instances beneath a namespace
ndctl, list: allow limiting namespace listing
ndctl: add libs dependency to spec file
ndctl, create-namespace: fix blk-namepsaces vs device-dax
ndctl, create-namespace: fix device-dax vs --map=
test, libndctl: move pfn + dax configurations to a destructive test
test, libndctl: kill some dead code
Documentation/ndctl-list.txt | 6 +++
ndctl.spec.in | 2 +
ndctl/Makefile.am | 3 -
ndctl/builtin-bat.c | 5 --
ndctl/builtin-list.c | 6 +++
ndctl/builtin-xaction-namespace.c | 12 ++++-
ndctl/util/json.c | 40 ++++++++++++++++++
test.h | 1
test/Makefile.am | 8 +---
test/dax-dev.c | 22 +++++++---
test/dax.sh | 5 +-
test/device-dax.c | 32 ++++++++++++++
test/device-dax.sh | 30 ++++++++++++++
test/libndctl.c | 82 ++++++++++++++++---------------------
test/mmap.sh | 7 +++
test/pcommit.c | 76 ----------------------------------
util/filter.c | 21 +++++++++
util/filter.h | 2 +
18 files changed, 211 insertions(+), 149 deletions(-)
create mode 100644 test/device-dax.c
create mode 100755 test/device-dax.sh
delete mode 100644 test/pcommit.c
4 years, 8 months
[ndctl PATCH v2] ndctl: make completion smarter wrt mode/type/idle options
by Vishal Verma
Add three new 'filters' for mode, type, and idle.
'mode' and 'type' work with each other to prevent a blk namespace from
showing modes like 'dax' or 'memory', or if those modes are specified,
then limiting 'type' to 'pmem'.
Also show completions for --map= only if mode is 'memory'.
For idle filtering (typically relevant for 'ndctl list', only show idle
{namespaces, regions} in the completion id a --idle has been specified
on the command line so far. This makes sense because trying to list an
idle namespace without --idle (even if you know that is the one you
want) won't show any output withot --idle.
Signed-off-by: Vishal Verma <vishal.l.verma(a)intel.com>
---
v2: Remove filtering for --map= (Dan)
contrib/ndctl | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/contrib/ndctl b/contrib/ndctl
index b7a82fc..160a9dc 100755
--- a/contrib/ndctl
+++ b/contrib/ndctl
@@ -110,6 +110,8 @@ __ndctl_get_regions()
{
local opts="--regions $*"
[ -n "$bus_filter" ] && opts="$opts --bus=$bus_filter"
+ [ -n "$type_filter" ] && opts="$opts --type=$type_filter"
+ [ -n "$idle_filter" ] && opts="$opts --idle"
echo "$(ndctl list $opts | grep -E "^\s*\"dev\":" | cut -d\" -f4)"
}
@@ -118,6 +120,8 @@ __ndctl_get_ns()
opts="--namespaces $*"
[ -n "$bus_filter" ] && opts="$opts --bus=$bus_filter"
[ -n "$reg_filter" ] && opts="$opts --bus=$reg_filter"
+ [ -n "$type_filter" ] && opts="$opts --type=$type_filter"
+ [ -n "$idle_filter" ] && opts="$opts --idle"
echo "$(ndctl list $opts | grep -E "^\s*\"dev\":" | cut -d\" -f4)"
}
@@ -147,7 +151,7 @@ __ndctl_comp_options()
opts=$(__ndctl_get_dimms)
;;
--namespace)
- opts=$(__ndctl_get_ns -i)
+ opts=$(__ndctl_get_ns)
;;
--reconfig)
# It is ok to reconfig disabled namespaces
@@ -155,9 +159,15 @@ __ndctl_comp_options()
;;
--type)
opts="pmem blk"
+ if [[ "$mode_filter" == @(dax|memory) ]]; then
+ opts="pmem"
+ fi
;;
--mode)
opts="raw sector memory dax"
+ if [[ "$type_filter" == "blk" ]]; then
+ opts="raw sector"
+ fi
;;
--map)
opts="mem dev"
@@ -224,13 +234,13 @@ __ndctl_prev_skip_opts ()
done
}
-bus_filter=''
-reg_filter=''
-
__ndctl_init_filters()
{
bus_filter=''
reg_filter=''
+ type_filter=''
+ idle_filter=''
+ mode_filter=''
for __word in "${words[@]}"; do
if [[ "$__word" =~ --bus=(.*) ]]; then
@@ -245,6 +255,15 @@ __ndctl_init_filters()
local regions=$(__ndctl_get_regions -i)
[[ "$regions" == *"$reg_filter"* ]] || reg_filter=''
fi
+ if [[ "$__word" =~ --idle ]]; then
+ idle_filter="1"
+ fi
+ if [[ "$__word" =~ --type=(.*) ]]; then
+ type_filter="${BASH_REMATCH[1]}"
+ fi
+ if [[ "$__word" =~ --mode=(.*) ]]; then
+ mode_filter="${BASH_REMATCH[1]}"
+ fi
done
}
--
2.5.5
4 years, 8 months
[ndctl PATCH] ndctl: make completion smarter wrt mode/type/idle options
by Vishal Verma
Add three new 'filters' for mode, type, and idle.
'mode' and 'type' work with each other to prevent a blk namespace from
showing modes like 'dax' or 'memory', or if those modes are specified,
then limiting 'type' to 'pmem'.
Also show completions for --map= only if mode is 'memory'.
For idle filtering (typically relevant for 'ndctl list', only show idle
{namespaces, regions} in the completion id a --idle has been specified
on the command line so far. This makes sense because trying to list an
idle namespace without --idle (even if you know that is the one you
want) won't show any output withot --idle.
Signed-off-by: Vishal Verma <vishal.l.verma(a)intel.com>
---
Applies on top of the last bash-completion patch:
"ndctl: bash completion updates for the --namespace= filter"
contrib/ndctl | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
diff --git a/contrib/ndctl b/contrib/ndctl
index b7a82fc..15ca3bf 100755
--- a/contrib/ndctl
+++ b/contrib/ndctl
@@ -110,6 +110,8 @@ __ndctl_get_regions()
{
local opts="--regions $*"
[ -n "$bus_filter" ] && opts="$opts --bus=$bus_filter"
+ [ -n "$type_filter" ] && opts="$opts --type=$type_filter"
+ [ -n "$idle_filter" ] && opts="$opts --idle"
echo "$(ndctl list $opts | grep -E "^\s*\"dev\":" | cut -d\" -f4)"
}
@@ -118,6 +120,8 @@ __ndctl_get_ns()
opts="--namespaces $*"
[ -n "$bus_filter" ] && opts="$opts --bus=$bus_filter"
[ -n "$reg_filter" ] && opts="$opts --bus=$reg_filter"
+ [ -n "$type_filter" ] && opts="$opts --type=$type_filter"
+ [ -n "$idle_filter" ] && opts="$opts --idle"
echo "$(ndctl list $opts | grep -E "^\s*\"dev\":" | cut -d\" -f4)"
}
@@ -147,7 +151,7 @@ __ndctl_comp_options()
opts=$(__ndctl_get_dimms)
;;
--namespace)
- opts=$(__ndctl_get_ns -i)
+ opts=$(__ndctl_get_ns)
;;
--reconfig)
# It is ok to reconfig disabled namespaces
@@ -155,12 +159,20 @@ __ndctl_comp_options()
;;
--type)
opts="pmem blk"
+ if [[ "$mode_filter" == @(dax|memory) ]]; then
+ opts="pmem"
+ fi
;;
--mode)
opts="raw sector memory dax"
+ if [[ "$type_filter" == "blk" ]]; then
+ opts="raw sector"
+ fi
;;
--map)
- opts="mem dev"
+ if [[ "$mode_filter" == "memory" ]]; then
+ opts="mem dev"
+ fi
;;
*)
return
@@ -224,13 +236,13 @@ __ndctl_prev_skip_opts ()
done
}
-bus_filter=''
-reg_filter=''
-
__ndctl_init_filters()
{
bus_filter=''
reg_filter=''
+ type_filter=''
+ idle_filter=''
+ mode_filter=''
for __word in "${words[@]}"; do
if [[ "$__word" =~ --bus=(.*) ]]; then
@@ -245,6 +257,15 @@ __ndctl_init_filters()
local regions=$(__ndctl_get_regions -i)
[[ "$regions" == *"$reg_filter"* ]] || reg_filter=''
fi
+ if [[ "$__word" =~ --idle ]]; then
+ idle_filter="1"
+ fi
+ if [[ "$__word" =~ --type=(.*) ]]; then
+ type_filter="${BASH_REMATCH[1]}"
+ fi
+ if [[ "$__word" =~ --mode=(.*) ]]; then
+ mode_filter="${BASH_REMATCH[1]}"
+ fi
done
}
--
2.5.5
4 years, 8 months
[ndctl PATCH] ndctl: delete duplicate -v on "ndctl destroy-namespace --help" page
by Dan Williams
"xable-namespace-options.txt" already includes a -v description, so
delete the local one.
Reported-by: Yi Zhang <yizhan(a)redhat.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
Documentation/ndctl-destroy-namespace.txt | 5 -----
1 file changed, 5 deletions(-)
diff --git a/Documentation/ndctl-destroy-namespace.txt b/Documentation/ndctl-destroy-namespace.txt
index ea6d2856107a..623820533cec 100644
--- a/Documentation/ndctl-destroy-namespace.txt
+++ b/Documentation/ndctl-destroy-namespace.txt
@@ -22,11 +22,6 @@ include::xable-namespace-options.txt[]
Specifying --force causes the namespace to be disabled before
the operation is attempted.
--v::
---verbose::
- Emit debug messages for the namespace destruction operation
-
-
SEE ALSO
--------
linkndctl:ndctl-create-namespace[1]
4 years, 8 months
[ndctl PATCH] ndctl: update readme for vmalloc() based nfit_test
by Dan Williams
In v4.8 when we have vmalloc() based nfit_test the test configuration no
longer requires a CMA allocation. While we're updating the document,
also refresh the configuration variables.
Reported-by: Yigal Korman <yigal(a)plexistor.com>
Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
---
README.md | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 76f93dafe4cb..a3def786f188 100644
--- a/README.md
+++ b/README.md
@@ -26,19 +26,25 @@ loaded. To build and install nfit_test.ko:
`git clone -b libnvdimm-for-next
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm.git`
-2. Configure the kernel to make some memory available to CMA (contiguous
- memory allocator).
-This will be used to emulate DAX.
+2. Skip to step 3 if the kernel version is >= v4.8. Otherwise, for
+ kernel versions < v4.8, configure the kernel to make some memory
+ available to CMA (contiguous memory allocator). This will be used to
+ emulate DAX.
`CONFIG_DMA_CMA=y`
`CONFIG_CMA_SIZE_MBYTES=200`
**or**
`cma=200M` on the kernel command line.
-3. Compile all components of the libnvdimm sub-system as modules:
+3. Compile the libnvdimm sub-system as a module, make sure "zone device"
+ memory is enabled, and enable the btt, pfn, and dax features of the
+ sub-system:
+`CONFIG_ZONE_DEVICE=y`
`CONFIG_LIBNVDIMM=m`
`CONFIG_BLK_DEV_PMEM=m`
`CONFIG_ND_BLK=m`
-`CONFIG_ND_BTT=m`
+`CONFIG_BTT=y`
+`CONFIG_NVDIMM_PFN=y`
+`CONFIG_NVDIMM_DAX=y`
4. Build and install the unit test enabled libnvdimm modules in the
following order. The unit test modules need to be in place prior to
4 years, 8 months