From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYvGl-0005F8-C1 for qemu-devel@nongnu.org; Fri, 20 Mar 2015 07:39:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YYvGi-0006x3-3d for qemu-devel@nongnu.org; Fri, 20 Mar 2015 07:39:15 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:53726) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YYvGh-0006wk-P5 for qemu-devel@nongnu.org; Fri, 20 Mar 2015 07:39:12 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 20 Mar 2015 11:39:10 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 0DDA117D8059 for ; Fri, 20 Mar 2015 11:39:34 +0000 (GMT) Received: from d06av01.portsmouth.uk.ibm.com (d06av01.portsmouth.uk.ibm.com [9.149.37.212]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t2KBd8aA9568684 for ; Fri, 20 Mar 2015 11:39:08 GMT Received: from d06av01.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av01.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t2KBd7In016277 for ; Fri, 20 Mar 2015 05:39:07 -0600 Date: Fri, 20 Mar 2015 12:39:06 +0100 From: Cornelia Huck Message-ID: <20150320123906.74d2c8f5.cornelia.huck@de.ibm.com> In-Reply-To: <1426671309-13645-15-git-send-email-jasowang@redhat.com> References: <1426671309-13645-1-git-send-email-jasowang@redhat.com> <1426671309-13645-15-git-send-email-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V4 14/19] virtio: introduce vector to virtqueues mapping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: qemu-devel@nongnu.org, mst@redhat.com On Wed, 18 Mar 2015 17:35:04 +0800 Jason Wang wrote: > Currently we will try to traverse all virtqueues to find a subset that > using a specific vector. This is sub optimal when we will support > hundreds or even thousands of virtqueues. So this patch introduces a > method which could be used by transport to get all virtqueues that > using a same vector. This is done through QLISTs and the number of > QLISTs was queried through a transport specific method. When guest > setting vectors, the virtqueue will be linked and helpers for traverse > the list was also introduced. > > The first user will be virtio pci which will use this to speed up > MSI-X masking and unmasking handling. > > Cc: Michael S. Tsirkin > Signed-off-by: Jason Wang > --- > hw/virtio/virtio-pci.c | 8 ++++++++ > hw/virtio/virtio.c | 32 ++++++++++++++++++++++++++++++-- > include/hw/virtio/virtio-bus.h | 1 + > include/hw/virtio/virtio.h | 3 +++ > 4 files changed, 42 insertions(+), 2 deletions(-) I'm still not too happy introducing this overhead for all devices when only pci will make use of it. Could we perhaps make the queue handling dependant on whether the transport actually provides the query_nvectors callback?