From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akOHI-0003pc-SN for qemu-devel@nongnu.org; Sun, 27 Mar 2016 23:55:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akOHC-0000Ak-DA for qemu-devel@nongnu.org; Sun, 27 Mar 2016 23:55:44 -0400 Received: from e36.co.us.ibm.com ([32.97.110.154]:47699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akOHC-0000Ae-6H for qemu-devel@nongnu.org; Sun, 27 Mar 2016 23:55:38 -0400 Received: from localhost by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sun, 27 Mar 2016 21:55:36 -0600 Received: from b03cxnp08025.gho.boulder.ibm.com (b03cxnp08025.gho.boulder.ibm.com [9.17.130.17]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 150D719D8040 for ; Sun, 27 Mar 2016 21:43:27 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u2S3tXlb45547690 for ; Sun, 27 Mar 2016 20:55:33 -0700 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u2S3tXvs011565 for ; Sun, 27 Mar 2016 21:55:33 -0600 References: <1458836125-73613-1-git-send-email-cornelia.huck@de.ibm.com> From: TU BO Message-ID: <56F8AB31.1090107@linux.vnet.ibm.com> Date: Mon, 28 Mar 2016 11:55:29 +0800 MIME-Version: 1.0 In-Reply-To: <1458836125-73613-1-git-send-email-cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 0/6] virtio: refactor host notifiers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , qemu-devel@nongnu.org Cc: pbonzini@redhat.com, famz@redhat.com, borntraeger@de.ibm.com, stefanha@redhat.com, mst@redhat.com Hi Cornelia: I got two crash with qemu master + "[PATCH 0/6] virtio: refactor host notifiers", I can get first crash very often. (gdb) bt #0 blk_aio_read_entry (opaque=0x0) at block/block-backend.c:922 #1 0x000002aa17a65f0e in coroutine_trampoline (i0=, i1=-1677713216) at util/coroutine-ucontext.c:78 #2 0x000003ffabfd150a in __makecontext_ret () from /lib64/libc.so.6 (gdb) list 917 static void blk_aio_read_entry(void *opaque) 918 { 919 BlkAioEmAIOCB *acb = opaque; 920 BlkRwCo *rwco = &acb->rwco; 921 922 rwco->ret = blk_co_preadv(rwco->blk, rwco->offset, rwco->qiov->size, 923 rwco->qiov, rwco->flags); 924 blk_aio_complete(acb); 925 } For 2nd crash, I just saw it once, and didn't reproduce it later. (gdb) bt #0 ioq_submit (s=s@entry=0x2aa3fe2cc80) at block/linux-aio.c:197 #1 0x000002aa3f645b36 in qemu_laio_completion_bh (opaque=0x2aa3fe2cc80) at block/linux-aio.c:143 #2 0x000002aa3f5ffbf0 in aio_bh_call (bh=) at async.c:65 #3 aio_bh_poll (ctx=0x2aa3fdf7e00) at async.c:93 #4 0x000002aa3f60a51e in aio_dispatch (ctx=ctx@entry=0x2aa3fdf7e00) at aio-posix.c:306 #5 0x000002aa3f60a7ca in aio_poll (ctx=0x2aa3fdf7e00, blocking=) at aio-posix.c:475 #6 0x000002aa3f53903c in iothread_run (opaque=0x2aa3fdf7220) at iothread.c:46 #7 0x000003ffa86084c6 in start_thread () from /lib64/libpthread.so.0 #8 0x000003ffa7c82ec2 in thread_start () from /lib64/libc.so.6 (gdb) list 192 struct iocb *iocbs[MAX_QUEUED_IO]; 193 QSIMPLEQ_HEAD(, qemu_laiocb) completed; 194 195 do { 196 len = 0; 197 QSIMPLEQ_FOREACH(aiocb, &s->io_q.pending, next) { 198 iocbs[len++] = &aiocb->iocb; 199 if (len == MAX_QUEUED_IO) { 200 break; 201 } On 16/3/25 上午12: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. > > Changes from RFC: > - Fixed some silly errors (checking for !disabled instead of disabled, > virtio_ccw_stop_ioeventfd() calling virtio_bus_start_ioeventfd()). > - Completely reworked set_host_notifier(): We only want to set/unset > the actual handler function and don't want to do anything to the > ioeventfd backing, so reduce the function to actually doing only > that. > - With the change above, we can lose the 'assign' parameter in > virtio_bus_stop_ioeventfd() again. > - Added more comments that hopefully make it clearer what is going on. > > I'd appreciate it if people could give it some testing; I'll be back > to look at the fallout after Easter. > > Cornelia Huck (6): > virtio-bus: common ioeventfd infrastructure > virtio-bus: have callers tolerate new host notifier api > virtio-ccw: convert to ioeventfd callbacks > virtio-pci: convert to ioeventfd callbacks > virtio-mmio: convert to ioeventfd callbacks > virtio-bus: remove old set_host_notifier callback > > hw/block/dataplane/virtio-blk.c | 6 +- > hw/s390x/virtio-ccw.c | 133 ++++++++++++++-------------------------- > hw/scsi/virtio-scsi-dataplane.c | 9 ++- > hw/virtio/vhost.c | 13 ++-- > hw/virtio/virtio-bus.c | 132 +++++++++++++++++++++++++++++++++++++++ > hw/virtio/virtio-mmio.c | 128 +++++++++++++------------------------- > hw/virtio/virtio-pci.c | 124 +++++++++++++------------------------ > include/hw/virtio/virtio-bus.h | 31 +++++++++- > 8 files changed, 303 insertions(+), 273 deletions(-) >