From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V77Pr-0006dk-5K for qemu-devel@nongnu.org; Wed, 07 Aug 2013 13:20:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V77Po-0002ZV-IN for qemu-devel@nongnu.org; Wed, 07 Aug 2013 13:20:55 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:37594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V77Pn-0002ZI-LB for qemu-devel@nongnu.org; Wed, 07 Aug 2013 13:20:52 -0400 Date: Wed, 07 Aug 2013 18:20:37 +0100 From: Alex Bligh Message-ID: <5E2996CC297635363A8E3DE3@nimrod.local> In-Reply-To: <1242198191.10821363.1375890238185.JavaMail.root@redhat.com> References: <1375639805-1943-1-git-send-email-alex@alex.org.uk> <1375780592-22842-1-git-send-email-alex@alex.org.uk> <20130806153857.GA9731@stefanha-thinkpad.redhat.com> <1242198191.10821363.1375890238185.JavaMail.root@redhat.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] [PATCHv6 00/16] aio / timers: Add AioContext timers and use ppoll Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , Alex Bligh , qemu-devel@nongnu.org, liu ping fan , Stefan Hajnoczi , MORITA Kazutaka , rth@twiddle.net Paolo, --On 7 August 2013 11:43:58 -0400 Paolo Bonzini wrote: >> For anyone wishing to review this series, here's a diagram showing the >> new relationships and a summary of this series: >> >> http://vmsplice.net/~stefan/timerlist.jpg >> >> TimerList is the list of QEMUTimers which are pending on a QEMUClock >> clock source. > > I just started reviewing this and the diagram may be different in > v7, No the data structures are the same, just bits renamed. > anyway: why do you need a default TimerListGroup? I would have > thought it is enough to use the default AioContext's own TLG. The default TimerListGroup has been renamed main_loop_tlg (or similar) in order to make this clearer. Right now, we have a peculiar double set of polling and waiting, an inner one in AioContext and an outer one in main_loop. Existing timer users may not be safe to be called within the inner AioContext and may expect to be run only from main_loop. Also, I believe there are some binaries that don't even have an AioContext at the moment, or may not have them at all times when timers are needed. I understand this may be simplified in the future, in which case if we always (in every binary) have a default AioContext AND it exists early enough, we can remove the main_loop_tlg and make the qemu_ functions uses the default AioContext. That's far from a huge change but I'd rather not do it is part of this series as I suspect there is the risk of breakage. -- Alex Bligh