pmem driver allows users to begin developing software using Direct Access Filesystems (DAX) such as EXT4 and XFS. A new memmap option was added that supports reserving one or more ranged of unassigned memory for use with emulated persistent memory. The memmap parameter documentation can be found at https://www.kernel.org/doc/Documentation/admin-guide/kernel-parameters.txt. This feature was upstreamed in the v4.0 Kernel. Kernel v4.15 introduced performance improvements and is recommended for production environments.memmap=nn[KMG]!ss[KMG] format; wherenn is the size of the region to reserve, ss is the starting offset, and [KMG] specifies the size in Kilobytes, Megabytes, or Gigabytes. The configuration option is passed to the Kernel using GRUB. Changing GRUB menu entries and kernel arguments vary between Linux distributions and versions of the same distro. Instructions for some of the common Linux distros can be found below. Refer to the documentation of the Linux distro and version being used for more information.memmap=4G!12G reserves 4GB of memory starting at 12GB through 16GB. See How To Choose the Correct memmap Option for Your System for more details. Each Linux distro has a different method for modifying the GRUB entries. Follow the documentation for your distro. A few of the common distros are provided below for quick reference.$ grubby --args="memmap=4G\!12G" --update-kernel=ALL$ sudo vi /etc/default/grubGRUB_CMDLINE_LINUX="memmap=4G!12G"$ sudo update-grub2$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg$ sudo grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg/dev/pmem{N} device should exist, one for each memmap region specified in the GRUB config. These can be shown using ls /dev/pmem*. Naming convention starts at /dev/pmem0 and increments for each device. The /dev/pmem{N} devices can be used to create a DAX filesystem.dax flag is set for the mount point to confirm the DAX feature is enabled. The following shows how to create and mount an EXT4 or XFS filesystem.memmap kernel parameter, consideration that the start and end addresses represent usable RAM must be made. Using or overlapping with reserved memory can result in corruption or undefined behaviour. This information is easily available in the e820 table, available via dmesg.fdisk or lsblk utilities can be used to show the capacity, eg:CONFIG_RANDOMIZE_BASE. When enabled, the Kernel may potentially use memory previously reserved for persistent memory without warning, resulting in corruption or undefined behaviour. It is recommended to disable KASLR on systems with 16GiB or less. Refer to your Linux distribution documentation for details as the procedure varies per distro.