Received: from eggs.gnu.org ([2001:4830:134:3::10]:54483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1dUN-0004pl-7y for qemu-devel@nongnu.org; Tue, 23 Jul 2013 10:22:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1dUK-0001Rt-LX for qemu-devel@nongnu.org; Tue, 23 Jul 2013 10:22:55 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:40581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1dUK-0001Rl-EN for qemu-devel@nongnu.org; Tue, 23 Jul 2013 10:22:52 -0400 Date: Tue, 23 Jul 2013 15:22:49 +0100 From: Alex Bligh Message-ID: <8AA34D734D44C9A6674CB4FF@nimrod.local> In-Reply-To: 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 Cc: Kevin Wolf , Anthony Liguori , Alex Bligh , Jan Kiszka , qemu-devel@nongnu.org, Stefan Hajnoczi , Paolo Bonzini Liu, --On 23 July 2013 10:56:42 +0800 liu ping fan wrote: >> I am told (by Stefan H) this approach is unsafe as existing timers may >> not expect to be run within aio_poll. >> > Have not figure out the reason, could you elaborate ? I asked Stefan H whether we could guarantee that it was safe to call any timer routine within aio_poll. He said no, because they might (reasonably) assume they were only being called from the main loop. Therefore we'd have to audit any existing user. I suppose an example of something unsafe might be calling aio_poll from inside a timer routine. Stefan thus recommended using a separate QEMUClock, and only running that clock's timers. -- Alex Bligh