From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH, RFC] virtio_blk: add cache flush command Date: Mon, 11 May 2009 18:45:50 +0300 Message-ID: <4A08482E.30100@redhat.com> References: <20090511083908.GB20082@lst.de> <4A083B7C.1000703@codemonkey.ws> <20090511154046.GA4226@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , Rusty Russell , kvm@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mx2.redhat.com ([66.187.237.31]:38500 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751845AbZEKPp6 (ORCPT ); Mon, 11 May 2009 11:45:58 -0400 In-Reply-To: <20090511154046.GA4226@lst.de> Sender: kvm-owner@vger.kernel.org List-ID: Christoph Hellwig wrote: >> If the backend implementation of T_FLUSH is fsync, I would think that >> this would result in rather poor performance for O_DIRECT operations in >> the guest. >> > > Right now it's fsync. By the time I'll submit the backend change it > will still be fsync, but at least called from the posix-aio-compat > thread pool. > I think if we have cache=writeback we should ignore this. The user is saying, I don't care about data loss, make the thing go fast. For cache=none and cache=writethrough we don't really need fsync, but we do need to flush the inflight commands. -- error compiling committee.c: too many arguments to function