From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAYfI-0002lA-LD for qemu-devel@nongnu.org; Thu, 02 Jul 2015 03:12:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAYfD-0004vo-Iv for qemu-devel@nongnu.org; Thu, 02 Jul 2015 03:12:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAYfD-0004vF-8C for qemu-devel@nongnu.org; Thu, 02 Jul 2015 03:12:03 -0400 References: <1435818839-5376-1-git-send-email-famz@redhat.com> From: Paolo Bonzini Message-ID: <5594E43E.1040400@redhat.com> Date: Thu, 2 Jul 2015 09:11:58 +0200 MIME-Version: 1.0 In-Reply-To: <1435818839-5376-1-git-send-email-famz@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] thread-pool: Notify AIO context upon completion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , borntraeger@de.ibm.com, Stefan Hajnoczi On 02/07/2015 08:33, Fam Zheng wrote: > bdrv_flush() uses a loop like > > while (rwco.ret == NOT_DONE) { > aio_poll(aio_context, true); > } > > to wait for thread pool, which may not get notified about the scheduled > BH right away, if there is no new event that wakes up a blocking > qemu_poll_ns(). That translates to "the dispatching optimization does not work". :) I do not think that is the problem. Paolo