On 08/16/2010 01:42 PM, Christoph Hellwig wrote:
On Mon, Aug 16, 2010 at 09:43:09AM -0500, Anthony Liguori wrote:
Also, ext4 is _very_ slow on O_SYNC writes (which is
used in kvm with default cache).
Yeah, we probably need to switch to sync_file_range() to avoid the
journal commit on every write.

No, we don't.  sync_file_range does not actually provide any data
integrity.

What do you mean by data integrity?

For each write in cache=writethrough, we don't have to ensure the data is on the platter. We really just need to ensure that the data has been sent to next level in the storage hierarchy and that it has been acknowledged as having been written. We don't need to actually inject a barrier.

My understanding is that on ext4/btrfs, an O_SYNC write injects a barrier for every write which is not the behavior we're looking for. As I understand it, sync_file_range() would give us the above guarantee without the barrier and for explicit barriers, we would use fsync.

Regards,

Anthony Liguori


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to