From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0qMf-0007QY-H8 for qemu-devel@nongnu.org; Sun, 21 Jul 2013 05:55:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0qMe-0001ac-H6 for qemu-devel@nongnu.org; Sun, 21 Jul 2013 05:55:41 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:58407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0qMe-0001aX-BE for qemu-devel@nongnu.org; Sun, 21 Jul 2013 05:55:40 -0400 Date: Sun, 21 Jul 2013 10:55:26 +0100 From: Alex Bligh Message-ID: In-Reply-To: <1374396185-10870-7-git-send-email-pingfank@linux.vnet.ibm.com> References: <1374396185-10870-1-git-send-email-pingfank@linux.vnet.ibm.com> <1374396185-10870-7-git-send-email-pingfank@linux.vnet.ibm.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] [RFC 6/8] timer: run timers on aio_poll Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Liu Ping Fan , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Jan Kiszka , Alex Bligh , Anthony Liguori , Paolo Bonzini --On 21 July 2013 16:43:03 +0800 Liu Ping Fan wrote: > diff --git a/aio-posix.c b/aio-posix.c > index b68eccd..29c2769 100644 > --- a/aio-posix.c > +++ b/aio-posix.c > @@ -191,6 +191,8 @@ bool aio_poll(AioContext *ctx, bool blocking) > progress = true; > } > > + qemu_run_all_timers(); > + > if (progress && !blocking) { > return true; > } I am told (by Stefan H) this approach is unsafe as existing timers may not expect to be run within aio_poll. Also, I suspect you need to change the value of progress if timers run so bdrv draining terminates properly. -- Alex Bligh