From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCkGM-0001qT-Jc for qemu-devel@nongnu.org; Wed, 08 Jul 2015 03:59:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZCkGH-0005Nb-IM for qemu-devel@nongnu.org; Wed, 08 Jul 2015 03:59:26 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:34931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZCkGH-0005NI-9I for qemu-devel@nongnu.org; Wed, 08 Jul 2015 03:59:21 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 Jul 2015 08:59:19 +0100 Message-ID: <559CD853.9040005@de.ibm.com> Date: Wed, 08 Jul 2015 09:59:15 +0200 From: Christian Borntraeger MIME-Version: 1.0 References: <1435670385-625-1-git-send-email-famz@redhat.com> <559BE81C.90602@de.ibm.com> <20150708010232.GC10382@ad.nay.redhat.com> In-Reply-To: <20150708010232.GC10382@ad.nay.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC 0/4] aio: Use epoll_wait in aio_poll List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , pbonzini@redhat.com, Stefan Hajnoczi , qemu-devel@nongnu.org, qemu-block@nongnu.org Am 08.07.2015 um 03:02 schrieb Fam Zheng: > On Tue, 07/07 16:54, Christian Borntraeger wrote: >> Am 30.06.2015 um 15:19 schrieb Fam Zheng: >>> epoll is more scalable than ppoll. It performs faster than ppoll when the >>> number of polled fds is high. >>> >>> See patch 4 for an example of the senario and some benchmark data. >>> >>> Note: it is only effective on iothread (dataplane), while the main loop cannot >>> benefit from this yet, because the iohandler and chardev GSource's don't easily >>> fit into this epoll interface style (that's why main loop uses qemu_poll_ns >>> directly instead of aio_poll()). >>> >>> There is hardly any timer activity in iothreads for now, as a result the >>> timeout is always 0 or -1. Therefore, timerfd, or the said nanosecond >>> epoll_pwait1 interface, which fixes the timeout granularity deficiency is not >>> immediately necessary at this point, but still that will be simple to add. >>> >>> Please review! >> >> Is there a branch somewhere, so that I could give it a spin? >> > > Here: > > https://github.com/famz/qemu/tree/aio-posix-epoll > In file included from /home/cborntra/REPOS/qemu/include/qemu/option.h:31:0, from /home/cborntra/REPOS/qemu/include/qemu-common.h:44, from /home/cborntra/REPOS/qemu/async.c:25: /home/cborntra/REPOS/qemu/async.c: In function 'aio_context_new': /home/cborntra/REPOS/qemu/include/qapi/error.h:57:20: error: 'ret' may be used uninitialized in this function [-Werror=maybe-uninitialized] error_set_errno(errp, os_error, ERROR_CLASS_GENERIC_ERROR, \ ^ /home/cborntra/REPOS/qemu/async.c:291:9: note: 'ret' was declared here int ret; ^ cc1: all warnings being treated as errors With that fixed, it seems to work. Still looking at the performance.