Il 17/03/2013 19:54, Peter Maydell ha scritto: > On 17 March 2013 18:51, Paolo Bonzini <pbonz...@redhat.com> wrote: >> Il 17/03/2013 01:04, Aurelien Jarno ha scritto: >>> | boot | install build-dep | build lm-sensors | >>> ------------------------+------+-------------------+------------------+ >>> versatile | 1:09 | 2:27 | 4:09 | >>> versatile cache=wb | 1:08 | 2:25 | 3:44 | >> >> Strange, cache=wb should be the default. >> >> The real problem with SD is that it doesn't have a flush command, hence >> it cannot be made safe against power losses. > > So, two things here: > (a) the way to make it safe against power loss is that when the > guest writes a block of data it has to really hit the emulated > disk, because this is how the hardware works > (b) I thought this was the reason cache=wb wasn't the default (ie > that we weren't defaulting to 'may lose data on powerloss').
See the commit message that Aurelien posted. The combination of "virtio-blk will auto-toggle to writethrough on very old kernels", "guests can toggle it for all of IDE/SCSI/virtio", "memory cards are anyway unusable with writethrough" finally made the balance tilt in favor of cache=wb. Paolo