From mboxrd@z Thu Jan 1 00:00:00 1970 From: Asdo Subject: Re: [RFC] vhost-blk implementation Date: Thu, 25 Mar 2010 16:00:56 +0100 Message-ID: <4BAB7AA8.8030509@shiftmail.org> References: <1269306023.7931.72.camel@badari-desktop> <4BA891E2.9040500@redhat.com> <20100324200502.GB22272@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Badari Pulavarty , kvm@vger.kernel.org To: Christoph Hellwig Return-path: Received: from mx2.isti.cnr.it ([194.119.192.4]:4059 "EHLO mx2.isti.cnr.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753051Ab0CYPBF (ORCPT ); Thu, 25 Mar 2010 11:01:05 -0400 Received: from conversionlocal.isti.cnr.it by mx.isti.cnr.it (PMDF V6.5 #31825) id <01NL676I57O0CHIPYM@mx.isti.cnr.it> for kvm@vger.kernel.org; Thu, 25 Mar 2010 16:00:46 +0100 In-reply-to: <20100324200502.GB22272@infradead.org> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > For the case where the file is actually a partition, use > submit_bio(). When the file is a file, keep it in qemu, that path is > going to be slower anyway. [CUT] Christoph Hellwig wrote: > On Tue, Mar 23, 2010 at 12:03:14PM +0200, Avi Kivity wrote: > >> I also think it should be done at the bio layer. File I/O is going to >> be slower, if we do vhost-blk we should concentrate on maximum >> performance. The block layer also exposes more functionality we can use >> (asynchronous barriers for example). >> > > The block layer is more flexible, but that limits you to only stack > directly ontop of a block device, which is extremly inflexible. > Would the loop device provide the features of a block device? I recall barrier support at least has been added recently. Is it recommended to run kvm on a loopback mounted file compared to on a raw file?