From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54566) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEKqz-0007wl-2o for qemu-devel@nongnu.org; Mon, 04 Aug 2014 12:11:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XEKqt-0002nm-Mx for qemu-devel@nongnu.org; Mon, 04 Aug 2014 12:11:17 -0400 Received: from mx.beyond.pl ([92.43.117.49]:57343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XEKqt-0002kv-Fq for qemu-devel@nongnu.org; Mon, 04 Aug 2014 12:11:11 -0400 Message-ID: <53DFB084.9040405@beyond.pl> Date: Mon, 04 Aug 2014 18:10:44 +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. s/mirror/commit/ > 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 I'll test it tomorrow. --=20 mg