From: Paolo Bonzini <pbonzini@redhat.com>
To: Halil Pasic <pasic@linux.vnet.ibm.com>,
qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>,
Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] virtio: fallback from irqfd to non-irqfd notify
Date: Wed, 1 Mar 2017 15:29:09 +0100 [thread overview]
Message-ID: <b24ba9f9-11f4-d17f-1973-b94e82316518@redhat.com> (raw)
In-Reply-To: <e78274bf-ed9b-3358-0a5d-271854247da1@linux.vnet.ibm.com>
On 01/03/2017 14:22, Halil Pasic wrote:
> Here a trace:
>
> 135871@1488304024.512533:virtio_blk_req_complete req 0x2aa6b117e10 status 0
> 135871@1488304024.512541:virtio_notify_irqfd vdev 0x2aa6b0e19d8 vq 0x2aa6b4c0870
> 135871@1488304024.522607:virtio_blk_req_complete req 0x2aa6b118980 status 0
> 135871@1488304024.522616:virtio_blk_req_complete req 0x2aa6b119260 status 0
> 135871@1488304024.522627:virtio_notify_irqfd vdev 0x2aa6b0e19d8 vq 0x2aa6b4c0870
> 135871@1488304024.527386:virtio_blk_req_complete req 0x2aa6b118980 status 0
> 135871@1488304024.527431:virtio_notify_irqfd vdev 0x2aa6b0e19d8 vq 0x2aa6b4c0870
> 135871@1488304024.528611:virtio_guest_notifier_read vdev 0x2aa6b0e61c8 vq 0x2aa6b4de880
> 135871@1488304024.528628:virtio_guest_notifier_read vdev 0x2aa6b0e61c8 vq 0x2aa6b4de8f8
> 135871@1488304024.528753:virtio_blk_data_plane_stop dataplane 0x2aa6b0e5540
> ^== DATAPLANE STOP
> 135871@1488304024.530709:virtio_blk_req_complete req 0x2aa6b117e10 status 0
> 135871@1488304024.530752:virtio_guest_notifier_read vdev 0x2aa6b0e19d8 vq 0x2aa6b4c0870
> ^== comes from k->set_guest_notifiers(qbus->parent, nvqs, false);
> in virtio_blk_data_plane_stop and done immediately after
> irqfd is cleaned up by the transport
> 135871@1488304024.530836:virtio_notify_irqfd vdev 0x2aa6b0e19d8 vq 0x2aa6b4c0870
> halil: error in event_notifier_set: Bad file descriptor
> ^== here we have the problem
>
> If you want a stacktrace that can be arranged to.
>
>> like a reset should cause it (the only call in virtio-blk is from
>> virtio_blk_data_plane_stop), and then the guest doesn't care anymore
>> about interrupts.
> I do not understand this with 'doesn't care anymore about interrupts'.
> I was debugging a virtio-blk device being stuck waiting for a host
> notification (interrupt) after migration.
Ok, this explains it better then. The issue is that
virtio_blk_data_plane_stop doesn't flush the bottom half, which you want
to do when the caller is, for example, virtio_ccw_vmstate_change.
Does it work if you call to qemu_bh_cancel(s->bh) and notify_guest_bh(s)
after
blk_set_aio_context(s->conf->conf.blk, qemu_get_aio_context());
?
Paolo
>> That path also does a qemu_bh_delete, so the notify_guest_bh should not
>> be invoked at all.
>>
> That's only for destroy. I'm migrating.
>
> Seems I tried to fix this is the wrong way. Was not too confident about it
> in the first place. Suggestions welcome!
next prev parent reply other threads:[~2017-03-01 14:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-01 11:50 [Qemu-devel] [PATCH 1/1] virtio: fallback from irqfd to non-irqfd notify Halil Pasic
2017-03-01 12:54 ` Michael S. Tsirkin
2017-03-01 13:31 ` Halil Pasic
2017-03-01 12:57 ` Paolo Bonzini
2017-03-01 13:22 ` Halil Pasic
2017-03-01 14:29 ` Paolo Bonzini [this message]
2017-03-01 16:08 ` Halil Pasic
2017-03-01 16:53 ` Michael S. Tsirkin
2017-03-01 19:53 ` Paolo Bonzini
2017-03-02 13:14 ` Halil Pasic
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=b24ba9f9-11f4-d17f-1973-b94e82316518@redhat.com \
--to=pbonzini@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=mst@redhat.com \
--cc=pasic@linux.vnet.ibm.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).