From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHVUG-0006uI-WA for qemu-devel@nongnu.org; Mon, 18 Mar 2013 04:32:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHVUF-0006LD-NV for qemu-devel@nongnu.org; Mon, 18 Mar 2013 04:32:08 -0400 Received: from mail-bk0-x22a.google.com ([2a00:1450:4008:c01::22a]:48519) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHVUF-0006Kv-Gi for qemu-devel@nongnu.org; Mon, 18 Mar 2013 04:32:07 -0400 Received: by mail-bk0-f42.google.com with SMTP id jk7so2351704bkc.29 for ; Mon, 18 Mar 2013 01:32:06 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5146D0FF.1000008@redhat.com> Date: Mon, 18 Mar 2013 09:31:59 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1362442784-22324-1-git-send-email-aurelien@aurel32.net> <20130305004438.GF23040@ohm.aurel32.net> <20130315154252.GC27432@hall.aurel32.net> <20130317000437.GA4241@ohm.aurel32.net> <51461094.9050502@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] hw/vexpress: set default block type to SD List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, Aurelien Jarno Il 17/03/2013 19:54, Peter Maydell ha scritto: > On 17 March 2013 18:51, Paolo Bonzini 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