From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [Qemu-devel] Re: [PATCH] virtio-blk: add SGI_IO passthru support Date: Tue, 5 May 2009 14:51:44 +0930 Message-ID: <200905051451.45452.rusty@rustcorp.com.au> References: <20090427082606.GA32604@lst.de> <200904291237.21558.paul@codesourcery.com> <20090430201350.GA30619@lst.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Paul Brook , qemu-devel@nongnu.org, Anthony Liguori , kvm@vger.kernel.org, Christian Borntraeger , Hannes Reinecke To: Christoph Hellwig Return-path: Received: from ozlabs.org ([203.10.76.45]:50099 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751424AbZEEFVq (ORCPT ); Tue, 5 May 2009 01:21:46 -0400 In-Reply-To: <20090430201350.GA30619@lst.de> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Fri, 1 May 2009 05:43:50 am Christoph Hellwig wrote: > On Wed, Apr 29, 2009 at 12:37:20PM +0100, Paul Brook wrote: > > How exactly does it introduce additional latency? A scsi command block is > > hardly large or complicated. Are you suggesting that a 16/32byte scsi > > command takes significantly longer to process than a 16byte virtio > > command descriptor? I'd expect any extra processing to be a small > > fraction of the host syscall latency, let alone the latency of the > > physical host adapter. It probably even fits on the same CPU cache line. > > Encoding the scsi CDB is additional work but I would be surprised it it > is mesurable. Just using scsi cdbs would be simple enough, the bigger > issue is emulating a full blown scsi bus because then you need to do all > kinds queueing decisions at target levels etc and drag in a complicated > scsi stack and not just a simple block driver in the guest. And at > least on current linux kernels that does introduce mesurable latency. > > Now it might be possible to get that latency down to a level where we > can ignore it but when doing all this additional work there always will > be additional overhead. But Paul, if you're enthusiastic you could patch lguest and show how simple it is :) Cheers, Rusty. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1D6M-0000s2-GC for qemu-devel@nongnu.org; Tue, 05 May 2009 01:21:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1D6G-0000rq-Fb for qemu-devel@nongnu.org; Tue, 05 May 2009 01:21:56 -0400 Received: from [199.232.76.173] (port=44571 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1D6G-0000rn-Bj for qemu-devel@nongnu.org; Tue, 05 May 2009 01:21:52 -0400 Received: from ozlabs.org ([203.10.76.45]:57540) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M1D6F-00056E-SN for qemu-devel@nongnu.org; Tue, 05 May 2009 01:21:52 -0400 From: Rusty Russell Subject: Re: [Qemu-devel] Re: [PATCH] virtio-blk: add SGI_IO passthru support Date: Tue, 5 May 2009 14:51:44 +0930 References: <20090427082606.GA32604@lst.de> <200904291237.21558.paul@codesourcery.com> <20090430201350.GA30619@lst.de> In-Reply-To: <20090430201350.GA30619@lst.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200905051451.45452.rusty@rustcorp.com.au> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christoph Hellwig Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org, Christian Borntraeger , Hannes Reinecke , Paul Brook On Fri, 1 May 2009 05:43:50 am Christoph Hellwig wrote: > On Wed, Apr 29, 2009 at 12:37:20PM +0100, Paul Brook wrote: > > How exactly does it introduce additional latency? A scsi command block is > > hardly large or complicated. Are you suggesting that a 16/32byte scsi > > command takes significantly longer to process than a 16byte virtio > > command descriptor? I'd expect any extra processing to be a small > > fraction of the host syscall latency, let alone the latency of the > > physical host adapter. It probably even fits on the same CPU cache line. > > Encoding the scsi CDB is additional work but I would be surprised it it > is mesurable. Just using scsi cdbs would be simple enough, the bigger > issue is emulating a full blown scsi bus because then you need to do all > kinds queueing decisions at target levels etc and drag in a complicated > scsi stack and not just a simple block driver in the guest. And at > least on current linux kernels that does introduce mesurable latency. > > Now it might be possible to get that latency down to a level where we > can ignore it but when doing all this additional work there always will > be additional overhead. But Paul, if you're enthusiastic you could patch lguest and show how simple it is :) Cheers, Rusty.