MOVNT_THRESHOLD size and power fail safety for < 256B writes in the raw mode

18 views
Skip to first unread message

Rukhsana Ansari

unread,
May 15, 2017, 6:03:26 PM5/15/17
to pmem
Hi,

I have 2 questions :
1. What is the reason for MOVNT_THRESHOLD to be specified as 256 Bytes?
2. If libpmem's pmem_persist_memcpy() is used for a size < 256B, for example, 64B, is the memcpy followed by the clflush operation power fail safe for an NVDIMM in ADR mode?

Thanks

Andy Rudoff

unread,
May 15, 2017, 7:01:36 PM5/15/17
to pmem
Hi,

On question 1:  The current threshold was determined with some quick benchmarks on DRAM to see when MOVNT appeared to be faster.  It is entirely possible that in the future, we decide the threshold should be different depending on the CPU type, NVDIMM type, or whatever.  But this seemed to give us a reasonable starting point.

On question 2: the threshold is about performance only, not correctness.  For memory ranges where pmem_is_pmem() returns true, pmem_memcpy_persist() will create a persistent copy.  It doesn't matter what size is passed to pmem_memcpy_persist(), or what the threshold is set to.

-andy

Rukhsana Ansari

unread,
May 15, 2017, 8:25:51 PM5/15/17
to pmem
Thanks Andy.
Reply all
Reply to author
Forward
0 new messages