From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43356) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V84hM-00031e-W3 for qemu-devel@nongnu.org; Sat, 10 Aug 2013 04:39:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V84hE-0005I9-Iv for qemu-devel@nongnu.org; Sat, 10 Aug 2013 04:38:56 -0400 Received: from mail-ea0-x22b.google.com ([2a00:1450:4013:c01::22b]:63165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V84hE-0005Hw-Ct for qemu-devel@nongnu.org; Sat, 10 Aug 2013 04:38:48 -0400 Received: by mail-ea0-f171.google.com with SMTP id n15so2458445ead.2 for ; Sat, 10 Aug 2013 01:38:47 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5205FBF4.9070902@redhat.com> Date: Sat, 10 Aug 2013 10:38:12 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1375998147-24292-1-git-send-email-alex@alex.org.uk> <1375998147-24292-10-git-send-email-alex@alex.org.uk> <5204BE51.70006@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC] [PATCHv8 09/30] aio / timers: Add QEMUTimerListGroup and helper functions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: Kevin Wolf , Anthony Liguori , Alex Bligh , qemu-devel@nongnu.org, Stefan Hajnoczi , MORITA Kazutaka , rth@twiddle.net Il 10/08/2013 05:27, liu ping fan ha scritto: >> > ... except if we get rid of TimerListGroup completely and put it in >> > AioContext. To do so, we can have _two_ AioContexts in main-loop.c. >> > One is for the block layer, the other is only used for timers. Later we > Why can the AioContexts of block layer NOT hold timers? For the > reason mainloop's iohandler runs after it? Or any reason raised by > blocklayer itself? The point of this series is to make the AioContexts of the block layer able to hold timers. At the same time, however, the main loop's timers cannot run during a qemu_aio_wait(), as that would be backwards-incompatible. So I'm proposing to have two AioContext, and in the future separate timers-for-the-block-layer from timers-for-everything-else. Paolo