I'm on a system with some Intel Optane Persistent Memory DIMMs, which contain large capacities of non-volatile memory. From here on out, I'll refer to them as "AEP", which stands for "Apache Pass", the memory technology that they use under the hood. The three most common ways of making this memory available to the operating system are:
In order to get into NUMA mode:
5.1.0-rc4
.
1LM
mode in the BIOS.
ipmctl
to put each individual AEP DIMM into AppDirect mode:
To do this to all AEP on socket 0, do:
ipmctl create -goal -socket 0 PersistentMemoryType=AppDirect
ipmctl
. However, you need
ndctl
and daxctl
to bind this region to the
appropriate kernel driver. The git checkout
command is only
necessary if you want to later use this utility to online your memory as
ZONE_NORMAL
, and if v67
hasn't been released yet.
git clone https://github.com/pmem/ndctl.git
git checkout 3fdaf7ed512ac564a78d6d2c7152be218e39c3c1
/etc/modprobe.d/daxctl.conf
. If it doesn't, then
you didn't globally install daxctl
to your system (it hardcodes some paths, so running this command from
the source directory doesn't work). Reboot again.
ipmctl
, using ndctl
:
ndctl list -R
ndctl create-namespace --region region0 -m dax
dax_pmem_compat
running:
lsmod | grep "dax_pmem_compat"
kmem
running:
lsmod | grep kmem
The last step has two methods, depending on whether you want the memory in
ZONE_NORMAL
or ZONE_MOVABLE
. This post
explains this conundrum in excrutiating detail.
If you have the kernel configuration CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE
, you can
manually bind the memory to the correct driver, and the kernel will automatically online
the memory as ZONE_NORMAL
for you:
dax0.0
,
dax1.0
, etc. This will list the namespaces, and within these should be
the device that they're associated with:
ndctl list -N
device_dax
driver:
echo dax0.0 > /sys/bus/dax/drivers/device_dax/unbind
kmem
driver:
echo dax0.0 > /sys/bus/dax/drivers/kmem/new_id
If you don't have that configuration, then use the daxctl
utility to do it
for you. Keep in mind that if you have version v66
and didn't do the git
checkout
command above, you won't have the --no-movable
option.
ZONE_MOVABLE
:
daxctl reconfigure-device --mode=system-ram all
ZONE_NORMAL
:
daxctl reconfigure-device --no-movable --mode=system-ram all
In order to get back into 2LM mode:
ndctl list -N
ndctl disable-namespace namespace0.0
ndctl destroy-namespace namespace0.0
ndctl list -R
ndctl disable-region region0
ndctl disable-region region1
ipmctl create -goal -socket 0 MemoryMode=100
ipmctl create -goal -socket 1 MemoryMode=100