Software Tuning, Performance Optimization & Platform Monitoring
Discussion regarding monitoring and software tuning methodologies, Performance Monitoring Unit (PMU) of Intel microprocessors, and platform updating.

Does msync come with a cache flushing operation


Hi, I noticed there are some words described in intel NVML page (, I quote them as follow: "Once created, the memory pool is represented by an opaque handle, of type PMEMobjpool*, which is passed to most of the other functions in this section. Internally, libpmemobj will use either pmem_persist() or msync(2) when it needs to flush changes, depending on whether the memory pool appears to be persistent memory or a regular file (see the pmem_is_pmem() function in libpmem(3) for more information). There is no need for applications to flush changes directly when using the obj memory API provided by libpmemobj."

My question is if we use regular file to flush, why we only use msync? To my understand, msync will not flush data in the cache. Does it mean there is cache flushing operation come with msync? 



0 Kudos
0 Replies