From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NoZXG-000415-Sf for qemu-devel@nongnu.org; Mon, 08 Mar 2010 04:46:02 -0500 Received: from [199.232.76.173] (port=50956 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NoZXG-000409-AF for qemu-devel@nongnu.org; Mon, 08 Mar 2010 04:46:02 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NoZXF-0004OB-HP for qemu-devel@nongnu.org; Mon, 08 Mar 2010 04:46:02 -0500 Received: from mx1.redhat.com ([209.132.183.28]:13035) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NoZXF-0004O7-5p for qemu-devel@nongnu.org; Mon, 08 Mar 2010 04:46:01 -0500 Message-ID: <4B94C74B.2080502@redhat.com> Date: Mon, 08 Mar 2010 11:45:47 +0200 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] bs->enable_write_cache and the guest ABI References: <4B93BB4A.8090605@redhat.com> <20100308093908.GA1914@lst.de> In-Reply-To: <20100308093908.GA1914@lst.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: qemu-devel On 03/08/2010 11:39 AM, Christoph Hellwig wrote: > On Sun, Mar 07, 2010 at 04:42:18PM +0200, Avi Kivity wrote: > >> This means that if I start a guest with cache=writethrough and then >> restart (or live migrate) it with cache=none, then the guest will see a >> change, even though the user only changed the drive's backing, not >> something guest visible. In the case of live migration, the guest will >> not even notice the change and we may be at risk of data loss. >> >> For 0.13 I propose setting enable_write_cache to true unconditionally. >> For 0.12 the question is more difficult, since we'll be changing the >> guest ABI. Given that guests are unlikely not to be able to cope with >> write caches, and that the alternative is data loss, I believe that's >> also the right solution there. >> > Setting it to true unconditionally will cause performance degradation > for cache=writethrough devices, as we now have to drain the queue in > the guest for no reason at all. > True. > I think the better option would be to move the cache setting to qdev > property on the block device at it's a device visible setting. > Reasonable. Should default to write cache enabled since that's compatible across all host caching policies; if the user knows they will keep the host caching policy consistent, they can disable it and reap the gain. Or keep the default as it is now, and make it the user's responsibility to keep track. In this case we need to add a paragraph to the qemu management guide. -- error compiling committee.c: too many arguments to function