On 05/07/2018 07:33 PM, Huaisheng HS1 Ye wrote:
diff --git a/mm/Kconfig b/mm/Kconfig
index c782e8f..5fe1f63 100644
@@ -687,6 +687,22 @@ config ZONE_DEVICE
+ bool "Manage NVDIMM (pmem) by memory management (EXPERIMENTAL)"
+ depends on NUMA && X86_64
I'm curious why this depends on NUMA. Couldn't it be useful in non-NUMA
(i.e., UMA) configs?
+ depends on HAVE_MEMBLOCK_NODE_MAP
+ depends on HAVE_MEMBLOCK
+ depends on !IA32_EMULATION
+ default n
+ This option allows you to use memory management subsystem to manage
+ NVDIMM (pmem). With it mm can arrange NVDIMMs into real physical zones
+ like NORMAL and DMA32. That means buddy system and swap can be used
+ directly to NVDIMM zone. This feature is beneficial to recover
+ dirty pages from power fail or system crash by storing write cache
+ to NVDIMM zone.