From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsksK-0008TE-Ef for qemu-devel@nongnu.org; Thu, 14 May 2015 00:36:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YsksH-00084B-9j for qemu-devel@nongnu.org; Thu, 14 May 2015 00:36:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52514) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YsksH-00083b-2H for qemu-devel@nongnu.org; Thu, 14 May 2015 00:35:57 -0400 Date: Thu, 14 May 2015 12:35:47 +0800 From: Fam Zheng Message-ID: <20150514043547.GG862@ad.nay.redhat.com> References: <1431574469-9605-1-git-send-email-famz@redhat.com> <1431574469-9605-14-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1431574469-9605-14-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH v2 13/13] iohandler: Use AioContext internally List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Jason Wang , Vincenzo Maffione , Stefan Hajnoczi , Paolo Bonzini , Giuseppe Lettieri , Luigi Rizzo On Thu, 05/14 11:34, Fam Zheng wrote: > AioContext and iohandler share the same concept except that AioContext > is more generalized - it runs on an AioContext which could be on the > main thread or an iothread. Similar to the relation of qemu_bh_new and > aio_bh_new, the iohandler is the special case of AioContext which > happens to run on the main thread context. > > Previously the only mismatch is the presense of qemu_set_fd_handler2 > with the special "can_read" parameter which is not available in > AioContext interface, now the parameter is removed, let's unify the code > and make iohandler a wrapper. Meanwhile, change the function's return > type to void because it always returns 0. > > This also simplifies the main loop by removing the qemu_iohandler_fill > and qemu_iohandler_poll hooks. > > One tiny things is this also makes sigfd depends on the main loop > AioContext, so we have to move the call of qemu_signal_init() in after > creation of qemu_aio_context. > > Signed-off-by: Fam Zheng Sorry, please skip this one for now (overlooked before sending), it's not safe to include iohandler fds in nested aio_poll, at least until the "device IO" op blocker patches are in. Fam