From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsvLA-0005aU-Kt for qemu-devel@nongnu.org; Wed, 09 Jan 2013 08:05:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsvL9-0004PK-0j for qemu-devel@nongnu.org; Wed, 09 Jan 2013 08:05:08 -0500 Received: from mail-da0-f42.google.com ([209.85.210.42]:45250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsvL8-0004OS-RG for qemu-devel@nongnu.org; Wed, 09 Jan 2013 08:05:06 -0500 Received: by mail-da0-f42.google.com with SMTP id z17so746912dal.1 for ; Wed, 09 Jan 2013 05:05:06 -0800 (PST) Message-ID: <50ED6AF4.4060300@gmail.com> Date: Wed, 09 Jan 2013 21:04:52 +0800 From: Liu Yuan MIME-Version: 1.0 References: <1355941771-3418-1-git-send-email-namei.unix@gmail.com> <87k3s6shdv.wl%morita.kazutaka@lab.ntt.co.jp> <50D967C3.7020109@gmail.com> <50E58B19.2050701@gmail.com> <20130104163830.GF6310@stefanha-thinkpad.hitronhub.home> <50E7AEC4.5080309@gmail.com> <50E7BA41.3020307@gmail.com> <50E7DC9B.4080309@gmail.com> <50EACC61.2020603@redhat.com> <50EBB1CB.9030608@gmail.com> <20130108094025.GE2557@stefanha-thinkpad.redhat.com> <50EBEAD2.6070608@gmail.com> <50EBEE42.7010407@redhat.com> <50EBF755.3050607@gmail.com> <50EBFA3F.8030808@redhat.com> <50EBFE20.9010100@gmail.com> <50EC00CE.80205@redhat.com> <50EC0493.8030701@gmail.com> <50EC0D41.4070200@redhat.com> <50EC1C9A.5040006@gmail.com> <50ED45A8.5020706@redhat.com> <50ED4829.1070302@gmail.com> <50ED4933.3040001@redhat.com> <50ED4A90.2080808@gmail.com> <50ED5D64.4040600@gmail.com> <50ED65AA.60000@redhat.com> In-Reply-To: <50ED65AA.60000@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] sheepdog: implement direct write semantics List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Paolo Bonzini , qemu-devel@nongnu.org, MORITA Kazutaka , Stefan Hajnoczi On 01/09/2013 08:42 PM, Kevin Wolf wrote: > Am 09.01.2013 13:07, schrieb Liu Yuan: >> Besides performance, I think backward compatibility is more important: >> 1 if we run a old kernel host (quite possible for a long running >> server) which doesn't support WCE, then we will never have a chance to >> choose writethrough cache for guest OS against new QEMU (most users tend >> to update user space tools to exclude bugs) > > How does the host kernel even play a role in this context? > Oops, my mind was broken. Okay, guest OS which doesn't support WCE can't change cache type as we discussed. >> 2 The upper layer software which relies on the 'cache=xxx' to choose >> cache mode will fail its assumption against new QEMU. > > Which assumptions do you mean? As far as I can say the behaviour hasn't > changed, except possibly for the performance. > When users set 'cache=writethrough' to export only a writethrough cache to Guest, but with new QEMU, it will actually get a writeback cache as default. >> We can see that the writeback behavior for Guest-WCE toggling is the >> same as expected. The difference is that if we set cache=writethrough, >> guest can't change it via WCE toggling. > > Then you need to make sure to communicate this to the guest. I'm not > convinced that adding extra logic to each device for this is a good idea. > We don't need to communicate to the guest. I think 'cache=xxx' means what kind of cache the users *expect* to export to Guest OS. So if cache=writethrough set, Guest OS couldn't turn it to writeback cache magically. This is like I bought a disk with 'writethrough' cache built-in, I didn't expect that it turned to be a disk with writeback cache under the hood which could possible lose data when power outage happened. So Guest-WCE only works when users provide us a writeback capable disk. Thanks, Yuan