qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V4 14/19] virtio: introduce vector to virtqueues


From: Jason Wang
Subject: Re: [Qemu-devel] [PATCH V4 14/19] virtio: introduce vector to virtqueues mapping
Date: Tue, 31 Mar 2015 10:37:29 +0800



On Fri, Mar 20, 2015 at 7:39 PM, Cornelia Huck <address@hidden> wrote:
On Wed, 18 Mar 2015 17:35:04 +0800
Jason Wang <address@hidden> 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 <address@hidden>
 Signed-off-by: Jason Wang <address@hidden>
 ---
  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?

Though I don't think it will introduce noticeable overhead. But looks like we can do as you suggest. Will do it in next version.

Thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]