diff mbox

[0/6] virtio: refactor host notifiers

Message ID 56FA8808.8050101@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paolo Bonzini March 29, 2016, 1:50 p.m. UTC
On 29/03/2016 13:45, Cornelia Huck wrote:
> > > Hi Tu Bo,
> > >
> > > please always include the assertion patch at
> > > https://lists.gnu.org/archive/html/qemu-block/2016-03/msg00546.html in
> > > your tests.  Can you include the backtrace from all threads with that patch?
> > >
> > thanks for your reminder about the assertion patch. Here is the 
> > backtrace with qemu master + assertion patch + "[PATCH 0/6] virtio: 
> > refactor host notifiers",
> 
> FWIW, I've been running this in a reboot loop for the last 2 1/2 hours.
> Could you perhaps share your command line?

From code inspection, the following is also necessary or at least a
good idea:

Comments

Christian Borntraeger March 29, 2016, 4:27 p.m. UTC | #1
On 03/29/2016 03:50 PM, Paolo Bonzini wrote:
> 
> 
> On 29/03/2016 13:45, Cornelia Huck wrote:
>>>> Hi Tu Bo,
>>>>
>>>> please always include the assertion patch at
>>>> https://lists.gnu.org/archive/html/qemu-block/2016-03/msg00546.html in
>>>> your tests.  Can you include the backtrace from all threads with that patch?
>>>>
>>> thanks for your reminder about the assertion patch. Here is the 
>>> backtrace with qemu master + assertion patch + "[PATCH 0/6] virtio: 
>>> refactor host notifiers",
>>
>> FWIW, I've been running this in a reboot loop for the last 2 1/2 hours.
>> Could you perhaps share your command line?
> 
> From code inspection, the following is also necessary or at least a
> good idea:
> 
> diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
> index 6fb29e3..7fa8477 100644
> --- a/hw/block/dataplane/virtio-blk.c
> +++ b/hw/block/dataplane/virtio-blk.c
> @@ -258,7 +258,7 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
>      aio_context_acquire(s->ctx);
> 
>      /* Stop notifications for new requests from guest */
> -    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx, false, false);
> +    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx, true, false);
> 
>      /* Drain and switch bs back to the QEMU main loop */
>      blk_set_aio_context(s->conf->conf.blk, qemu_get_aio_context());
> 

Right. Tu Bo, you seem to have the best testcase for this.
Does your setup runs fine with this on top?

CHristian
tu bo March 31, 2016, 2:37 a.m. UTC | #2
Hi Christian:

On 03/30/2016 12:27 AM, Christian Borntraeger wrote:
> On 03/29/2016 03:50 PM, Paolo Bonzini wrote:
>>
>>
>> On 29/03/2016 13:45, Cornelia Huck wrote:
>>>>> Hi Tu Bo,
>>>>>
>>>>> please always include the assertion patch at
>>>>> https://lists.gnu.org/archive/html/qemu-block/2016-03/msg00546.html in
>>>>> your tests.  Can you include the backtrace from all threads with that patch?
>>>>>
>>>> thanks for your reminder about the assertion patch. Here is the
>>>> backtrace with qemu master + assertion patch + "[PATCH 0/6] virtio:
>>>> refactor host notifiers",
>>>
>>> FWIW, I've been running this in a reboot loop for the last 2 1/2 hours.
>>> Could you perhaps share your command line?
>>
>>  From code inspection, the following is also necessary or at least a
>> good idea:
>>
>> diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
>> index 6fb29e3..7fa8477 100644
>> --- a/hw/block/dataplane/virtio-blk.c
>> +++ b/hw/block/dataplane/virtio-blk.c
>> @@ -258,7 +258,7 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
>>       aio_context_acquire(s->ctx);
>>
>>       /* Stop notifications for new requests from guest */
>> -    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx, false, false);
>> +    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx, true, false);
>>
>>       /* Drain and switch bs back to the QEMU main loop */
>>       blk_set_aio_context(s->conf->conf.blk, qemu_get_aio_context());
>>
>
> Right. Tu Bo, you seem to have the best testcase for this.
> Does your setup runs fine with this on top?

My test needs at least four scsi disks, which was broken now because of 
the s38 firmware update. I'll test it when s38 scsi is ready. thx

>
> CHristian
>
tu bo March 31, 2016, 5:47 a.m. UTC | #3
Hi Christian:

I got the same crash with qemu master + assertion patch + "[PATCH 0/6] 
virtio: refactor host notifiers" +  Paolo's fix,

(gdb) bt
#0  blk_aio_read_entry (opaque=0x0) at block/block-backend.c:916
#1  0x000002aa2e8e88fe in coroutine_trampoline (i0=<optimized out>, 
i1=-1677703696) at util/coroutine-ucontext.c:78
#2  0x000003ffa85d150a in __makecontext_ret () from /lib64/libc.so.6


On 03/30/2016 12:27 AM, Christian Borntraeger wrote:
> On 03/29/2016 03:50 PM, Paolo Bonzini wrote:
>>
>>
>> On 29/03/2016 13:45, Cornelia Huck wrote:
>>>>> Hi Tu Bo,
>>>>>
>>>>> please always include the assertion patch at
>>>>> https://lists.gnu.org/archive/html/qemu-block/2016-03/msg00546.html in
>>>>> your tests.  Can you include the backtrace from all threads with that patch?
>>>>>
>>>> thanks for your reminder about the assertion patch. Here is the
>>>> backtrace with qemu master + assertion patch + "[PATCH 0/6] virtio:
>>>> refactor host notifiers",
>>>
>>> FWIW, I've been running this in a reboot loop for the last 2 1/2 hours.
>>> Could you perhaps share your command line?
>>
>>  From code inspection, the following is also necessary or at least a
>> good idea:
>>
>> diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
>> index 6fb29e3..7fa8477 100644
>> --- a/hw/block/dataplane/virtio-blk.c
>> +++ b/hw/block/dataplane/virtio-blk.c
>> @@ -258,7 +258,7 @@ void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
>>       aio_context_acquire(s->ctx);
>>
>>       /* Stop notifications for new requests from guest */
>> -    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx, false, false);
>> +    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx, true, false);
>>
>>       /* Drain and switch bs back to the QEMU main loop */
>>       blk_set_aio_context(s->conf->conf.blk, qemu_get_aio_context());
>>
>
> Right. Tu Bo, you seem to have the best testcase for this.
> Does your setup runs fine with this on top?
>
> CHristian
>
diff mbox

Patch

diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c
index 6fb29e3..7fa8477 100644
--- a/hw/block/dataplane/virtio-blk.c
+++ b/hw/block/dataplane/virtio-blk.c
@@ -258,7 +258,7 @@  void virtio_blk_data_plane_stop(VirtIOBlockDataPlane *s)
     aio_context_acquire(s->ctx);
 
     /* Stop notifications for new requests from guest */
-    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx, false, false);
+    virtio_queue_aio_set_host_notifier_handler(s->vq, s->ctx, true, false);
 
     /* Drain and switch bs back to the QEMU main loop */
     blk_set_aio_context(s->conf->conf.blk, qemu_get_aio_context());