From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6gYx-0008ER-PS for qemu-devel@nongnu.org; Tue, 06 Aug 2013 08:40:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6gYk-0004yI-Lq for qemu-devel@nongnu.org; Tue, 06 Aug 2013 08:40:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6gYk-0004yA-F9 for qemu-devel@nongnu.org; Tue, 06 Aug 2013 08:40:18 -0400 Date: Tue, 6 Aug 2013 14:40:00 +0200 From: Stefan Hajnoczi Message-ID: <20130806124000.GF30812@stefanha-thinkpad.redhat.com> References: <1375639805-1943-1-git-send-email-alex@alex.org.uk> <1375780592-22842-1-git-send-email-alex@alex.org.uk> <1375780592-22842-11-git-send-email-alex@alex.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1375780592-22842-11-git-send-email-alex@alex.org.uk> Subject: Re: [Qemu-devel] [RFC] [PATCHv6 10/16] aio / timers: aio_ctx_prepare sets timeout from AioContext timers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Bligh Cc: Kevin Wolf , Anthony Liguori , qemu-devel@nongnu.org, liu ping fan , Paolo Bonzini , MORITA Kazutaka , rth@twiddle.net On Tue, Aug 06, 2013 at 10:16:26AM +0100, Alex Bligh wrote: > @@ -180,7 +189,7 @@ aio_ctx_check(GSource *source) > return true; > } > } > - return aio_pending(ctx); > + return aio_pending(ctx) || (timerlistgroup_deadline_ns(ctx->tlg) >= 0); Now we always dispatch if there is a timer? Should this comparison be timerlistgroup_deadline_ns(ctx->tlg) == 0 instead to only dispatch expired timers? Stefan