Received: from eggs.gnu.org ([2001:4830:134:3::10]:45035) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Mvo-0005yO-5d for qemu-devel@nongnu.org; Thu, 25 Jul 2013 10:54:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2Mvi-0001dD-W9 for qemu-devel@nongnu.org; Thu, 25 Jul 2013 10:54:16 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:57727) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2Mvi-0001ck-On for qemu-devel@nongnu.org; Thu, 25 Jul 2013 10:54:10 -0400 Date: Thu, 25 Jul 2013 15:53:55 +0100 From: Alex Bligh Message-ID: <3379099F707F8EF4EA235B6B@nimrod.local> In-Reply-To: <20130725093343.GF21033@stefanha-thinkpad.redhat.com> References: <1E8E204.8000201@redhat.com> <1374343603-29183-1-git-send-email-alex@alex.org.uk> <1374343603-29183-7-git-send-email-alex@alex.org.uk> <20130725093343.GF21033@stefanha-thinkpad.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] [PATCHv2] [RFC 6/7] aio / timers: Switch to ppoll, run AioContext timers in aio_poll/aio_dispatch Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , Alex Bligh , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini , rth@twiddle.net Stefan, --On 25 July 2013 11:33:43 +0200 Stefan Hajnoczi wrote: >> assert(progress || busy); >> - return true; >> + return progress; > > Now aio_poll() can return false when it used to return true? I don't think that's a bug. Firstly, this is the same thing you fixed and we discussed on another thread. Secondly, aio_poll always could return false. With the post patch line numbering, here: 233 /* No AIO operations? Get us out of here */ 234 if (!busy) { 235 return progress; 236 } The only circumstance where it now return false when previously it would have exited at the bottom of aio_poll and returned true is if g_poll returns such that aio_dispatch does nothing. That requires there to be no aio_dispatch to the normal FD handlers (which would generally mean a timeout) AND no timers running. This might happen if there was zero timeout. -- Alex Bligh