From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51398) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFfZ4-0005FU-HH for qemu-devel@nongnu.org; Thu, 16 Jul 2015 05:34:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFfZ0-0004BF-Gk for qemu-devel@nongnu.org; Thu, 16 Jul 2015 05:34:50 -0400 Received: from mail-wg0-x22e.google.com ([2a00:1450:400c:c00::22e]:35451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFfZ0-0004B7-94 for qemu-devel@nongnu.org; Thu, 16 Jul 2015 05:34:46 -0400 Received: by wgjx7 with SMTP id x7so53516439wgj.2 for ; Thu, 16 Jul 2015 02:34:45 -0700 (PDT) Sender: Paolo Bonzini References: <1436980403-25898-1-git-send-email-pbonzini@redhat.com> <20150715201435.GF3582@noname.redhat.com> <55A6E5D7.8000204@redhat.com> <20150716091450.GA5050@noname.redhat.com> From: Paolo Bonzini Message-ID: <55A77AB1.80303@redhat.com> Date: Thu, 16 Jul 2015 11:34:41 +0200 MIME-Version: 1.0 In-Reply-To: <20150716091450.GA5050@noname.redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] AioContext: fix broken ctx->dispatching optimization List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: lersek@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, rjones@redhat.com On 16/07/2015 11:14, Kevin Wolf wrote: >>> With this information, I understand that what has changed is that the >>> > > return value of g_main_context_iteration() changes from true before this >>> > > patch (had the aio_notify() from aio_set_fd_handler() pending) to false >>> > > after the patch (aio_notify() doesn't inject an event any more). >>> > > >>> > > This should mean that like above we can assert that the first iteration >>> > > returns false, i.e. reverse the assertion (and indeed, with this >>> > > change the test still passes for me). >> > >> > I was a bit undecided about this. In the end I decided that the calls >> > to aio_poll/g_main_context_iteration were just to put the AioContext in >> > a known state, and the assertions on the return value of g_assert were >> > not really important. For this reason, the while loop seemed to express >> > the intentions best, and I made it consistent between the AioContext and >> > GSource cases. > You changed the AioContext case in this same patch, even if you didn't > quote my comment on that hunk. :-) > > Both cases were asserting the return value before. I'll change the testcase (other than the aio_notify testcase) in a separate patch. Paolo