From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbvF6-0002e6-8z for Qemu-devel@nongnu.org; Wed, 29 Jun 2011 09:55:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbvF4-0006P5-Bd for Qemu-devel@nongnu.org; Wed, 29 Jun 2011 09:55:47 -0400 Received: from verein.lst.de ([213.95.11.211]:52125 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbvF3-0006Od-Qt for Qemu-devel@nongnu.org; Wed, 29 Jun 2011 09:55:46 -0400 Date: Wed, 29 Jun 2011 15:55:45 +0200 From: Christoph Hellwig Message-ID: <20110629135545.GD15863@lst.de> References: <4E0B1399.4050807@redhat.com> <4E0B15B2.40504@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4E0B15B2.40504@codemonkey.ws> Subject: Re: [Qemu-devel] Default cache mode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Kevin Wolf , Avi Kivity , Christoph Hellwig , Qemu-devel@nongnu.org, Stefan Hajnoczi On Wed, Jun 29, 2011 at 07:08:18AM -0500, Anthony Liguori wrote: > As long as we advertise wce and wce can be toggled from the guest, I don't > think the default is all that important. I think cache=on is the right > default for most common use cases. What do you mean with cache=on? We have cache=[none,writeback,writethrough,unsafe]. As discussed about a dozen times before these are an incomplete choice of the [odirect=on,off; osync=on,off, ignore cache flushes=on,off] matrix. Not using O_DIRECT when it is available is almost always the wrong choice. It means an additional data copy, VM pressure and exercise of often suck fsync/O_SYNC codepatheses, with only a benefit if you have multiple VMs actually using the same dataset with the same COW backing image. Using WCE = 0 or 1 is a tradeoff of safety vs performance. WCE=0 performance generally sucks badly, but offers data integrity for older or non-PCish host operating systems.