From: Fam Zheng <famz@redhat.com>
To: Ed Swierk <eswierk@skyportsystems.com>
Cc: qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] virtio-scsi-pci iothread spins at 100%
Date: Thu, 9 Feb 2017 13:39:17 +0800 [thread overview]
Message-ID: <20170209053917.GH22807@lemon.lan> (raw)
In-Reply-To: <CAO_EM_kh1mQZNhjRKi458u15kj0G6t=UEFBvM+wWhOX1fyi6VQ@mail.gmail.com>
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.
Hmm, maybe I'm missing something. How about this:
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index ce19eff..8b23e80 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -754,9 +754,7 @@ out:
void virtio_scsi_handle_event_vq(VirtIOSCSI *s, VirtQueue *vq)
{
- if (s->events_dropped) {
- virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0);
- }
+ virtio_scsi_push_event(s, NULL, VIRTIO_SCSI_T_NO_EVENT, 0);
}
static void virtio_scsi_handle_event(VirtIODevice *vdev, VirtQueue *vq)
next prev parent reply other threads:[~2017-02-09 5:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-08 16:33 [Qemu-devel] virtio-scsi-pci iothread spins at 100% Ed Swierk
2017-02-08 16:54 ` Ed Swierk
2017-02-09 1:47 ` Fam Zheng
2017-02-09 2:11 ` Ed Swierk
2017-02-09 2:52 ` Fam Zheng
2017-02-09 3:44 ` Ed Swierk
2017-02-09 5:39 ` Fam Zheng [this message]
2017-02-09 6:43 ` Fam Zheng
2017-02-09 10:12 ` Fam Zheng
2017-02-09 13:52 ` Ed Swierk
2017-02-09 14:16 ` Fam Zheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170209053917.GH22807@lemon.lan \
--to=famz@redhat.com \
--cc=eswierk@skyportsystems.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).