From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60723) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrUcH-0001m4-RM for qemu-devel@nongnu.org; Mon, 02 Jun 2014 11:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WrUc9-0005vM-Fc for qemu-devel@nongnu.org; Mon, 02 Jun 2014 11:57:41 -0400 Received: from mx.beyond.pl ([92.43.117.49]:34810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WrUc9-0005vI-9L for qemu-devel@nongnu.org; Mon, 02 Jun 2014 11:57:33 -0400 Message-ID: <538C9EE9.70903@beyond.pl> Date: Mon, 02 Jun 2014 17:57:29 +0200 From: =?UTF-8?B?TWFyY2luIEdpYnXFgmE=?= MIME-Version: 1.0 References: <538A1F71.4080203@beyond.pl> <538B6D25.8030106@redhat.com> <538B78A9.8060804@beyond.pl> <538C990E.1080308@redhat.com> In-Reply-To: <538C990E.1080308@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] thread-pool: fix deadlock when callbacks depends on each other List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , "qemu-devel@nongnu.org" Cc: Stefan Hajnoczi >> I'll test it tomorrow. I assume you want to avoid calling >> event_notifier_set() until function is reentered via aio_pool? > > Yes. But actually, I need to check if it's possible to fix > bdrv_drain_all. If you're in coroutine context, you can defer the > draining to a safe point using a bottom half. If you're not in > coroutine context, perhaps bdrv_drain_all has to be made illegal. Which > means a bunch of code auditing... For what it's worth, your solution also works fine, I couldn't recreate hang with it. Updated patch proposal posted earlier today. -- mg