From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40861) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agVkz-0008Ah-9D for qemu-devel@nongnu.org; Thu, 17 Mar 2016 07:06:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agVkw-0005DE-LR for qemu-devel@nongnu.org; Thu, 17 Mar 2016 07:06:21 -0400 Received: from e19.ny.us.ibm.com ([129.33.205.209]:53888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agVkw-0005D3-Hg for qemu-devel@nongnu.org; Thu, 17 Mar 2016 07:06:18 -0400 Received: from localhost by e19.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Mar 2016 07:06:16 -0400 References: <1458123018-18651-1-git-send-email-famz@redhat.com> <56E9355A.5070700@redhat.com> <56E93A22.1080102@de.ibm.com> <56E93ECE.10103@redhat.com> <56E9425C.8030201@de.ibm.com> <56E957AD.2050005@redhat.com> <56E961EA.4090908@de.ibm.com> <56E9638B.5090204@redhat.com> <20160317003906.GA23821@ad.usersys.redhat.com> From: tu bo Message-ID: <56EA8EEE.2020801@linux.vnet.ibm.com> Date: Thu, 17 Mar 2016 19:03:10 +0800 MIME-Version: 1.0 In-Reply-To: <20160317003906.GA23821@ad.usersys.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/4] Tweaks around virtio-blk start/stop List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , Paolo Bonzini Cc: Kevin Wolf , qemu-block@nongnu.org, "Michael S. Tsirkin" , qemu-devel@nongnu.org, Christian Borntraeger , Stefan Hajnoczi , cornelia.huck@de.ibm.com On 03/17/2016 08:39 AM, Fam Zheng wrote: > On Wed, 03/16 14:45, Paolo Bonzini wrote: >> >> >> On 16/03/2016 14:38, Christian Borntraeger wrote: >>>> If you just remove the calls to virtio_queue_host_notifier_read, here >>>> and in virtio_queue_aio_set_host_notifier_fd_handler, does it work >>>> (keeping patches 2-4 in)? >>> >>> With these changes and patch 2-4 it does no longer locks up. >>> I keep it running some hour to check if a crash happens. >>> >>> Tu Bo, your setup is currently better suited for reproducing. Can you also check? >> >> Great, I'll prepare a patch to virtio then sketching the solution that >> Conny agreed with. >> >> While Fam and I agreed that patch 1 is not required, I'm not sure if the >> mutex is necessary in the end. > > If we can fix this from the virtio_queue_host_notifier_read side, the mutex/BH > are not necessary; but OTOH the mutex does catch such bugs, so maybe it's good > to have it. I'm not sure about the BH. > > And on a hindsight I realize we don't want patches 2-3 too. Actually the > begin/end pair won't work as expected because of the blk_set_aio_context. > > Let's hold on this series. > >> >> So if Tu Bo can check without the virtio_queue_host_notifier_read calls, >> and both with/without Fam's patches, it would be great. > > Tu Bo, only with/withoug patch 4, if you want to check. Sorry for the noise. > 1. without the virtio_queue_host_notifier_read calls, without patch 4 crash happens very often, (gdb) bt #0 bdrv_co_do_rw (opaque=0x0) at block/io.c:2172 #1 0x000002aa165da37e in coroutine_trampoline (i0=, i1=1812051552) at util/coroutine-ucontext.c:79 #2 0x000003ff7dd5150a in __makecontext_ret () from /lib64/libc.so.6 2. without the virtio_queue_host_notifier_read calls, with patch 4 crash happens very often, (gdb) bt #0 bdrv_co_do_rw (opaque=0x0) at block/io.c:2172 #1 0x000002aa39dda43e in coroutine_trampoline (i0=, i1=-1677715600) at util/coroutine-ucontext.c:79 #2 0x000003ffab6d150a in __makecontext_ret () from /lib64/libc.so.6 > Thanks, > Fam >