From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiFmV-0007yW-BD for qemu-devel@nongnu.org; Mon, 31 Aug 2009 18:55:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiFmQ-0007xk-Ri for qemu-devel@nongnu.org; Mon, 31 Aug 2009 18:55:22 -0400 Received: from [199.232.76.173] (port=45060 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiFmQ-0007xh-N9 for qemu-devel@nongnu.org; Mon, 31 Aug 2009 18:55:18 -0400 Received: from mail2.shareable.org ([80.68.89.115]:53908) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MiFmQ-00021G-8m for qemu-devel@nongnu.org; Mon, 31 Aug 2009 18:55:18 -0400 Date: Mon, 31 Aug 2009 23:55:16 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH 1/4] block: add enable_write_cache flag Message-ID: <20090831225516.GF24318@shareable.org> References: <20090831201627.GA4811@lst.de> <20090831201651.GA4874@lst.de> <20090831220950.GB24318@shareable.org> <20090831221622.GA8834@lst.de> <4A9C5463.4090904@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A9C5463.4090904@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Christoph Hellwig , qemu-devel@nongnu.org Anthony Liguori wrote: > Christoph Hellwig wrote: > >>If an unsafe mode is desired (I think it is, for those throwaway > >>testing VMs, or during OS installs), I suggest adding cache=volatile: > >> > >> cache=none > >> O_DIRECT, fdatasync, advertise volatile write cache > >> > >> cache=writethrough > >> O_SYNC, do not advertise > >> > >> cache=writeback > >> fdatasync, advertise volatile write cache > >> > >> cache=volatile > >> nothing (perhaps fdatasync on QEMU blockdev close) > >> > > > >Fine withe me, let the flame war begin :) > > > > I think we should pity our poor users and avoid adding yet another > obscure option that is likely to be misunderstood. > > Can someone do some benchmarking with cache=writeback and fdatasync > first and quantify what the real performance impact is? > > I think the two reasonable options are 1) make cache=writeback safe, > avoid a massive perf decrease in the process 2) keep cache=writeback as > a no-guarantees option. Right now, cache=writeback does set the bit for SCSI emulation, which makes it safe for guests which understand that. Removing that is a regression in safety, not merely a lack of change. -- Jamie