Received: from eggs.gnu.org ([2001:4830:134:3::10]:46659) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4oZB-0005Pc-MC for qemu-devel@nongnu.org; Wed, 09 Jul 2014 05:53:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4oZ1-0000yZ-Cf for qemu-devel@nongnu.org; Wed, 09 Jul 2014 05:53:33 -0400 Received: from mail-qg0-x229.google.com ([2607:f8b0:400d:c04::229]:59703) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4oZ1-0000yR-8Q for qemu-devel@nongnu.org; Wed, 09 Jul 2014 05:53:23 -0400 Received: by mail-qg0-f41.google.com with SMTP id i50so6444628qgf.0 for ; Wed, 09 Jul 2014 02:53:22 -0700 (PDT) Received: from yakj.usersys.redhat.com (net-2-35-201-190.cust.vodafonedsl.it. [2.35.201.190]) by mx.google.com with ESMTPSA id j97sm31669122qgd.37.2014.07.09.02.53.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Jul 2014 02:53:21 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Wed, 9 Jul 2014 11:53:00 +0200 Message-Id: <1404899590-24973-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH for-2.2 00/10] AioContext cleanups and Win32 socket support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This series simplifies heavily aio_poll by splitting it into three phases: prepare (aio_compute_timeout), poll, dispatch. The resulting code shares more logic between aio_poll and the GSource wrappers, and makes it easier to add Win32 support for sockets. Win32 support for sockets is a prerequisite for moving the NBD server into the BlockDriverState's attached AioContext. It is done in the final patch, based on earlier work from Or Goshen (from Intel). I had to more or less rewrite it to fit the new framework, but you can see parts of Or's work, as well as traces of aio-posix.c and main-loop.c logic. Tested with NBD boot under Wine. Paolo Paolo Bonzini (10): AioContext: take bottom halves into account when computing aio_poll timeout aio-win32: Evaluate timers after handles aio-win32: Factor out duplicate code into aio_dispatch_handlers AioContext: run bottom halves after polling AioContext: export and use aio_dispatch test-aio: test timers on Windows too aio-win32: add aio_set_dispatching optimization AioContext: introduce aio_prepare qemu-coroutine-io: fix for Win32 aio-win32: add support for sockets aio-posix.c | 58 ++++-------- aio-win32.c | 262 +++++++++++++++++++++++++++++++++++++++------------- async.c | 39 +++++--- block/Makefile.objs | 2 - include/block/aio.h | 25 ++++- nbd.c | 2 +- qemu-coroutine-io.c | 4 +- tests/test-aio.c | 48 +++------- 8 files changed, 277 insertions(+), 163 deletions(-) -- 1.9.3