On Mon, Jul 25, 2011 at 04:04:49PM +0200, Victor Stinner wrote: > According to agraf__ on IRC (#kvm on FreeNode), the cache mode has > the following effect: > > - cache=writethrough calls fsync() after every write() It uses O_DSYNC, which an be appromiately described as an fdatasync after every write. Not that it makes a different for most workloads on btrfs. > - cache=none uses O_DIRECT > - cache=writeback calls fsync() when the guest issues a barrier() > (don't use O_DIRECT) Issue a cache flush. Barriers were an Linux-internal concept that is now gone. And there never was a barriere() call. > FreeBSD installation in VirtualBox is as fast (or maybe a little bit > slower) than the installation in kvm using cache=unsafe. I suppose > that VirtualBox uses something like cache=unsafe or cache=writeback. What filesystem do you use in FreeBSD? FFS traditionally never issued cache flushes, so cache=writeback is equal to cache=unsafe for it. ZFS can issue cache flushes on Solaris, but I'm not sure if this was ported correctly to FreeBSD. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
