From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:33040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtJx7-0000N7-V0 for qemu-devel@nongnu.org; Thu, 10 Jan 2013 10:21:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TtJx3-0006NB-2r for qemu-devel@nongnu.org; Thu, 10 Jan 2013 10:21:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TtJx2-0006N2-Qp for qemu-devel@nongnu.org; Thu, 10 Jan 2013 10:21:53 -0500 Message-ID: <50EEDC6B.2050109@redhat.com> Date: Thu, 10 Jan 2013 16:21:15 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <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> <20130110151218.GC21483@jl-vm1.vm.bytemark.co.uk> In-Reply-To: <20130110151218.GC21483@jl-vm1.vm.bytemark.co.uk> Content-Type: text/plain; charset=ISO-8859-1 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: Jamie Lokier Cc: Liu Yuan , Paolo Bonzini , qemu-devel@nongnu.org, MORITA Kazutaka , Stefan Hajnoczi Am 10.01.2013 16:12, schrieb Jamie Lokier: > Kevin Wolf wrote: >> Am 08.01.2013 11:39, schrieb Liu Yuan: >>> On 01/08/2013 06:00 PM, Kevin Wolf wrote: >>>> Am 08.01.2013 10:45, schrieb Liu Yuan: >>>>> On 01/08/2013 05:40 PM, Stefan Hajnoczi wrote: >>>>>> Otherwise use sheepdog writeback and let QEMU block.c decide when to >>>>>> flush. Never use sheepdog writethrough because it's redundant here. >>>>> >>>>> I don't get it. What do you mean by 'redundant'? If we use virtio & >>>>> sheepdog block driver, how can we specify writethrough mode for Sheepdog >>>>> cache? Here 'writethrough' means use a pure read cache, which doesn't >>>>> need flush at all. >>>> >>>> A writethrough cache is equivalent to a write-back cache where each >>>> write is followed by a flush. qemu makes sure to send these flushes, so >>>> there is no need use Sheepdog's writethrough mode. >>> >>> Implement writethrough as writeback + flush will cause considerable >>> overhead for network block device like Sheepdog: a single write request >>> will be executed as two requests: write + flush >> >> Yeah, maybe we should have some kind of a FUA flag with write requests >> instead of sending a separate flush. > > Note that write+FUA has different semantics than write+flush, at least > with regular disks. > > write+FUA commits just what was written, while write+flush commits > everything that was written before. True. However, when you use it for implementing a writethrough mode, i.e. every single write has the FUA flag set, then it ought to be the same. One thing to take care of might be doing one explicit flush when switching from writeback to writethrough. Kevin