From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEicQ-0004e5-6p for qemu-devel@nongnu.org; Tue, 05 Aug 2014 13:33:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEicH-00037q-Rl for qemu-devel@nongnu.org; Tue, 05 Aug 2014 13:33:50 -0400 Received: from mx.beyond.pl ([92.43.117.49]:58016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEicH-00037c-Ko for qemu-devel@nongnu.org; Tue, 05 Aug 2014 13:33:41 -0400 Message-ID: <53E1156B.8030702@beyond.pl> Date: Tue, 05 Aug 2014 19:33:31 +0200 From: =?UTF-8?B?TWFyY2luIEdpYnXFgmE=?= MIME-Version: 1.0 References: <1407167793-20425-1-git-send-email-stefanha@redhat.com> In-Reply-To: <1407167793-20425-1-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] linux-aio: avoid deadlock in nested aio_poll() calls List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Ming Lei W dniu 2014-08-04 17:56, Stefan Hajnoczi pisze: > If two Linux AIO request completions are fetched in the same > io_getevents() call, QEMU will deadlock if request A's callback waits > for request B to complete using an aio_poll() loop. This was reported > to happen with the mirror blockjob. > > This patch moves completion processing into a BH and makes it resumable= . > Nested event loops can resume completion processing so that request B > will complete and the deadlock will not occur. > > Cc: Kevin Wolf > Cc: Paolo Bonzini > Cc: Ming Lei > Cc: Marcin Gibu=C5=82a > Reported-by: Marcin Gibu=C5=82a > Signed-off-by: Stefan Hajnoczi This patch fixes the block-commit hang when using linux-aio, so: Tested-by: Marcin Gibu=C5=82a --=20 mg