6 ms·
This is a nice improvement. Now instead of having sfence/pcommit/sfence to flush writes to nvram, you would use just an sfence to ensure ordering with subsequen
by eloff 10y ago
This is a nice improvement. Now instead of having sfence/pcommit/sfence to flush writes to nvram, you would use just an sfence to ensure ordering with subsequent stores (e.g. a store that publishes the written data.)
Its analogous to fysnc() to ensure data reaches the disk in a way that survives power failure. This is like just treating all writes as fsynced and not needing to worry about fsync at all, like with O_DIRECT writes.
- caf 10y agoNot exactly, you still need a cache flush if you want to ensure that your write is persistent.
- eloff 10y agoSorry, yes I omitted that detail. You do need the cache flush still for each written cache line.
- koverstreet 10y agoIt's a lie that you don't need fsync with O_DIRECT - writes could still be in the hard drive's write buffer, or the filesystem could have metadata updates that haven't been written yet (e.g. unwritten extents that need to be marked as written).
- deleted 10y ago[deleted]