From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50289) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzgRo-0003s6-5y for qemu-devel@nongnu.org; Thu, 18 Jul 2013 01:08:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzgRk-00043v-4w for qemu-devel@nongnu.org; Thu, 18 Jul 2013 01:08:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzgRj-00043o-Tz for qemu-devel@nongnu.org; Thu, 18 Jul 2013 01:08:08 -0400 Date: Thu, 18 Jul 2013 13:08:00 +0800 From: Stefan Hajnoczi Message-ID: <20130718050800.GB26971@stefanha-thinkpad.redhat.com> References: <1373948938-2494-1-git-send-email-pingfank@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1373948938-2494-1-git-send-email-pingfank@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v6] QEMUBH: make AioContext's bh re-entrant List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan Cc: Kevin Wolf , Paolo Bonzini , qemu-devel@nongnu.org On Tue, Jul 16, 2013 at 12:28:58PM +0800, Liu Ping Fan wrote: > BH will be used outside big lock, so introduce lock to protect > between the writers, ie, bh's adders and deleter. The lock only > affects the writers and bh's callback does not take this extra lock. > Note that for the same AioContext, aio_bh_poll() can not run in > parallel yet. > > Signed-off-by: Liu Ping Fan > Reviewed-by: Stefan Hajnoczi > --- > v6: > destroy ctx->bh_lock in aio_ctx_finalize() > --- > async.c | 33 +++++++++++++++++++++++++++++++-- > include/block/aio.h | 7 +++++++ > 2 files changed, 38 insertions(+), 2 deletions(-) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan