Message ID | 20170209025212.GG22807@lemon.lan |
---|---|
State | New |
Headers | show |
On Wed, Feb 8, 2017 at 6:52 PM, Fam Zheng <famz@redhat.com> wrote: > This means virtio-scsi event vq handler is returning true but actually no > progress is made. Can you try the following patch to see if it's because a > stalled cache of VQ index? > > diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c > index 6365706..7f7ab57 100644 > --- a/hw/virtio/virtio.c > +++ b/hw/virtio/virtio.c > @@ -2126,7 +2126,7 @@ static bool virtio_queue_host_notifier_aio_poll(void *opaque) > EventNotifier *n = opaque; > VirtQueue *vq = container_of(n, VirtQueue, host_notifier); > > - if (virtio_queue_empty(vq)) { > + if (vring_avail_idx(vq) == vq->last_avail_idx) { > return false; > } I tried this change but the behavior is the same, unfortunately. --Ed
On Wed, 02/08 19:44, Ed Swierk wrote: > On Wed, Feb 8, 2017 at 6:52 PM, Fam Zheng <famz@redhat.com> wrote: > > This means virtio-scsi event vq handler is returning true but actually no > > progress is made. Can you try the following patch to see if it's because a > > stalled cache of VQ index? > > > > diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c > > index 6365706..7f7ab57 100644 > > --- a/hw/virtio/virtio.c > > +++ b/hw/virtio/virtio.c > > @@ -2126,7 +2126,7 @@ static bool virtio_queue_host_notifier_aio_poll(void *opaque) > > EventNotifier *n = opaque; > > VirtQueue *vq = container_of(n, VirtQueue, host_notifier); > > > > - if (virtio_queue_empty(vq)) { > > + if (vring_avail_idx(vq) == vq->last_avail_idx) { > > return false; > > } > > I tried this change but the behavior is the same, unfortunately. This should fix it: https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg01874.html It would be great if you could help test it. Fam
On Thu, Feb 9, 2017 at 2:12 AM, Fam Zheng <famz@redhat.com> wrote: > This should fix it: > > https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg01874.html I tested this patch and found it fixes the problem. Thanks for the speedy response! --Ed
On Thu, 02/09 05:52, Ed Swierk wrote: > On Thu, Feb 9, 2017 at 2:12 AM, Fam Zheng <famz@redhat.com> wrote: > > This should fix it: > > > > https://lists.gnu.org/archive/html/qemu-devel/2017-02/msg01874.html > > I tested this patch and found it fixes the problem. Thanks for the > speedy response! Thanks for the testing! If you could reply to the patch with a "Tested-by:" line that would be even better. :) Fam
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 6365706..7f7ab57 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -2126,7 +2126,7 @@ static bool virtio_queue_host_notifier_aio_poll(void *opaque) EventNotifier *n = opaque; VirtQueue *vq = container_of(n, VirtQueue, host_notifier); - if (virtio_queue_empty(vq)) { + if (vring_avail_idx(vq) == vq->last_avail_idx) { return false; }