From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:58415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHJ9k-0003iQ-H8 for qemu-devel@nongnu.org; Sun, 17 Mar 2013 15:22:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UHJ9j-00038N-Ag for qemu-devel@nongnu.org; Sun, 17 Mar 2013 15:22:08 -0400 Received: from hall.aurel32.net ([2001:470:1f15:c4f::1]:55154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UHJ9j-00037N-3X for qemu-devel@nongnu.org; Sun, 17 Mar 2013 15:22:07 -0400 Date: Sun, 17 Mar 2013 20:22:05 +0100 From: Aurelien Jarno Message-ID: <20130317192205.GF27432@hall.aurel32.net> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: Sender: Aurelien Jarno 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: Paolo Bonzini , qemu-devel@nongnu.org On Sun, Mar 17, 2013 at 06:54:47PM +0000, Peter Maydell wrote: > 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'). At the > time I last looked into command line options for these boards I'm > pretty sure it wasn't the default, because the performance improvement > from turning on caching was huge. > For the record, this has been changed in this commit: commit 1f212b9d3edd8679bafd3bcf0301795206438724 Author: Paolo Bonzini Date: Thu Aug 9 16:07:21 2012 +0200 blockdev: flip default cache mode from writethrough to writeback Now all major device models (IDE, SCSI, virtio) can choose between writethrough and writeback at run-time, and virtio will even revert to writethrough if the guest is not capable of sending flushes. So we can change the default to writeback at last. Tested, for lack of a better idea, with a breakpoint on bdrv_open and all cache choices one by one. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net