News for hackers. Stuff that matters.
Re:Things Unix can do atomically (2010) by prodigal_erik on Monday May 30, 2016 @08:51PM (#11803994)
I haven't tested but I would expect MS_INVALIDATE on a large buffer to be much faster than filling it a word at a time with __sync_val_compare_and_swap (each causing its own bus transaction).
Re:Things Unix can do atomically (2010) by gpderetta on Tuesday May 31, 2016 @06:50AM (#11805788)
MS_INVALIDATE is likely a no-op on any modernish Unix, including Linux. It is there to accommodate old systems with non-coherent mapped files and page caches or even multiple mappings of the same file.
Re:Things Unix can do atomically (2010) by throwaway76543 on Monday May 30, 2016 @10:39PM (#11804244)
msync() doesn't fill buffers at all. It has no function in the operation you've described.

Even if it did, it's not atomic ...