Message ID | 56F41E8D.5000609@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 24 Mar 2016 18:06:21 +0100 Paolo Bonzini <pbonzini@redhat.com> wrote: > On 24/03/2016 17:15, Cornelia Huck wrote: > > Here's the next version of my refactoring of the virtio host notifiers. > > This one actually survives a bit of testing for me (reboot loop). > > > > As this patchset fixes a latent bug exposed by the recent dataplane > > changes (we have a deassigned ioeventfd for a short period of time > > during dataplane start, which leads to the virtqueue handler being > > called in both the vcpu thread and the iothread simultaneously), I'd > > like to see this in 2.6. > > Tested-by: Paolo Bonzini <pbonzini@redhat.com> > > Resisted 6 minutes versus 10 seconds. At about 2.5 seconds per reboot, > that means the failure happened at the fourth reboot before, and > resisted about 150 reboots with your patches. Thanks for testing! Is the failure still the same? I thought I had understood the problem by now, and I'm wondering which hole we're still missing.
On 29/03/2016 10:18, Cornelia Huck wrote: >> > >> > Tested-by: Paolo Bonzini <pbonzini@redhat.com> >> > >> > Resisted 6 minutes versus 10 seconds. At about 2.5 seconds per reboot, >> > that means the failure happened at the fourth reboot before, and >> > resisted about 150 reboots with your patches. > > Thanks for testing! > > Is the failure still the same? I thought I had understood the problem > by now, and I'm wondering which hole we're still missing. No, I just had to leave after the 6 minutes so I turned it off. :) Paolo
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index cb710f1..d0b8248 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -591,6 +591,7 @@ return; } + assert(atomic_fetch_inc(&s->reentrancy_test) == 0); blk_io_plug(s->blk); while ((req = virtio_blk_get_request(s))) { @@ -602,6 +603,7 @@ } blk_io_unplug(s->blk); + atomic_dec(&s->reentrancy_test); } static void virtio_blk_dma_restart_bh(void *opaque) diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h index ae84d92..5cb66cd 100644 --- a/include/hw/virtio/virtio-blk.h +++ b/include/hw/virtio/virtio-blk.h @@ -54,6 +54,7 @@ typedef struct VirtIOBlock { bool original_wce; VMChangeStateEntry *change; bool dataplane_started; + int reentrancy_test; struct VirtIOBlockDataPlane *dataplane; } VirtIOBlock;