From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:59780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIKSU-0003Hy-3Y for qemu-devel@nongnu.org; Fri, 06 May 2011 08:48:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QIKST-0003Hc-BD for qemu-devel@nongnu.org; Fri, 06 May 2011 08:48:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QIKST-0003HR-42 for qemu-devel@nongnu.org; Fri, 06 May 2011 08:48:37 -0400 Message-ID: <4DC3EE14.1060109@redhat.com> Date: Fri, 06 May 2011 14:48:20 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <4DC1D30F.4070408@redhat.com> <20110505094323.GC5298@stefanha-thinkpad.localdomain> <4DC29CCB.8050903@redhat.com> <4DC2B455.9090007@suse.de> <4DC2B946.80100@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] virtio-scsi spec, first public draft List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel , Hannes Reinecke , Stefan Hajnoczi On 05/06/2011 02:31 PM, Stefan Hajnoczi wrote: > Okay, this explains how you plan to handle targets appearing - you > want to set a maximum number of targets. I was wondering how we would > add virtqueues dynamically (and why the control vqs are placed last at > n,n+1 instead of 0,1). You don't, it's not in the spec. On the other hand, I don't think a limit on the number of targets is imposing, and the limit that virtio places is more theoretical than practical. (Control virtqueues are last simply to avoid +2 and -2 all over the place). > I'm really not sure I understand the win of creating lots of > virtqueues. I just want a pipe out onto the SCSI bus so I can talk to > all devices in the SCSI domain. Creating separate virtqueues > increases complexity in the driver and emulation IMO. In the driver, probably. Emulation shouldn't change much, there's so little to do in the end in a PV HBA emulation if you have a proper SCSI subsystem and the protocol is a simple transport or reasonably close. > What is the MSI-X win you mentioned? I guess if an application on > vcpu0 is accessing target0 a lot then interrupt handling can be > handled on vcpu0 while other vcpus handle interrupts for other SCSI > targets? Yes, possibly. But I think the main benefit is in resiliency. If one target malfunctions and timeouts, other targets still work normally until the SCSI layer decides to reset that target. > I remember VMware pv scsi has a trick here, each request can > contain the vcpu number which influences interrupt routing somehow. I don't think it works under Linux though, it depends on how the OS sets up the APICs. Paolo