is_pmem is 0 on devdax

24 views
Skip to first unread message

Adrian Jackson

unread,
Jun 18, 2018, 6:25:46 AM6/18/18
to pmem
Hi,

I'm testing a simple benchmark on some NVDIMMs, but pmem_map_file is returning is_pmem as 0 when running on NVDIMMs setup as devdax (i.e. available at /dev/dax13.0), even though it is actually creating a file of the correct size for my array.

Is there something special I need to do to get pmem_map_file to work on this setup, or does pmem_map_file not work on devdax?

thanks

adrianj

Piotr Balcer

unread,
Jun 18, 2018, 10:29:47 AM6/18/18
to pmem
Hi Adrian,
If true, this is a bug in the library, could you tell us what's the version of the library you are using?

The "pmem_map_file" should work just fine with devdax, and is_pmem should be unconditionally true on platforms that support at least the clflush instruction.

There's *one* special consideration for devdax:
 

  The path can point to a Device DAX. In this case only the PMEM_FILE_CREATE and PMEM_FILE_SPARSE flags are valid, but they are both ignored. For Device DAX mappings, len must be equal to either 0 or the exact size of the device.


For more, see libpmem man page: http://pmem.io/pmdk/manpages/linux/master/libpmem/pmem_is_pmem.3


Piotr
Reply all
Reply to author
Forward
0 new messages