qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector


From: Cornelia Huck
Subject: Re: [Qemu-devel] [PATCH] vhost: don't set vring call if no vector
Date: Tue, 2 Aug 2016 08:37:13 +0200

On Tue, 2 Aug 2016 10:39:22 +0800
Jason Wang <address@hidden> wrote:

> On 2016年08月02日 02:00, Cornelia Huck wrote:
> > On Mon,  1 Aug 2016 16:07:58 +0800
> > Jason Wang <address@hidden> wrote:

> >> +    if (k->query_guest_notifiers &&
> >> +        k->query_guest_notifiers(qbus->parent) &&
> >> +        virtio_queue_vector(vdev, idx) == VIRTIO_NO_VECTOR) {
> > I'm trying to imagine what this means for virtio-ccw. Keep in mind that
> > we don't have the concept of setting a 'vector' by the OS (the vector
> > is setup internally to the queue index and the OS does not see it.)
> >
> > ->query_guest_notifiers() is true if the OS has enabled the subchannel
> > of the proxy device (i.e., if it is enabled for doing *anything* with
> > the subchannel, regardless whether the OS wants to be notified or is
> > planning to poll.) The second condition will never hold true for any
> > valid queue once the OS has setup the queues.
> 
> I see, so If I understand correctly, there's no way to detect whether or 
> not guest will use a specific virtqueue interrupt?

Yes. The guest will either be notified for any virtqueue (if it
registered indicators; this is always done for every vq of the device
at once), or for none.

> 
> >
> > So this won't break anything for virtio-ccw AFAICS, but I don't think
> > we gain anything.
> 
> Yes, but if we could infer whether or not polling is used in the driver, 
> this is probably all we can do for ccw.

What we could do is check whether the driver has registed indicators
and disable setting up notification for any vq of the device if not.
But I'm not sure an always-polling driver is worth optimizing for.




reply via email to

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