From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEO50-0005La-Eq for qemu-devel@nongnu.org; Tue, 27 Aug 2013 14:33:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VEO4z-0001H5-Em for qemu-devel@nongnu.org; Tue, 27 Aug 2013 14:33:26 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:48424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VEO4z-0001Gy-9n for qemu-devel@nongnu.org; Tue, 27 Aug 2013 14:33:25 -0400 Date: Tue, 27 Aug 2013 19:33:10 +0100 From: Alex Bligh Message-ID: <124DEAD9CBCDF142688FE57F@Ximines.local> In-Reply-To: <1377614385-20466-1-git-send-email-stefanha@redhat.com> References: <1377614385-20466-1-git-send-email-stefanha@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: Re: [Qemu-devel] [RFC] aio: add aio_context_acquire() and aio_context_release() Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Alex Bligh , Wenchao Xia --On 27 August 2013 16:39:45 +0200 Stefan Hajnoczi wrote: > This patch implements aio_context_acquire() and aio_context_release(). > Note that existing aio_poll() callers do not need to worry about > acquiring and releasing - it is only needed when multiple threads will > call aio_poll() on the same AioContext. I think this patch has another use. For reasons I forget (init of the QemuTimerListGroup being one of them) creation and deletion of AioContexts has to do be done with the BQL held. If a second thread is the ONLY user of the AioContext, this would allow some synchronisation with the eventual deletion under the BQL on the main thread. -- Alex Bligh