From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8vuW-0004fQ-PQ for qemu-devel@nongnu.org; Mon, 12 Aug 2013 13:28:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V8vuN-0006Ai-G4 for qemu-devel@nongnu.org; Mon, 12 Aug 2013 13:28:04 -0400 Received: from mail-wg0-x236.google.com ([2a00:1450:400c:c00::236]:52776) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V8vuN-00067z-AI for qemu-devel@nongnu.org; Mon, 12 Aug 2013 13:27:55 -0400 Received: by mail-wg0-f54.google.com with SMTP id e12so5673540wgh.33 for ; Mon, 12 Aug 2013 10:27:54 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <52091AF5.5090606@redhat.com> Date: Mon, 12 Aug 2013 19:27:17 +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> <66F49369-34D8-4F02-87B7-946095072EBD@alex.org.uk> <5204FE33.1060306@redhat.com> <520503D2.1020006@redhat.com> <12227494-C6D2-467E-B7B3-6765F78EEB44@alex.org.uk> <52074302.5030807@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: Alex Bligh Cc: Kevin Wolf , Anthony Liguori , liu ping fan , qemu-devel@nongnu.org, Stefan Hajnoczi , Wenchao Xia , MORITA Kazutaka , rth@twiddle.net Il 11/08/2013 10:29, Alex Bligh ha scritto: > Paolo, > > --On 11 August 2013 09:53:38 +0200 Paolo Bonzini > wrote: > >> There is actually a disadvantage of moving TimerListGroup to AioContext. >> The disadvantage is that GSources can only work with millisecond >> resolution. Thus you would need anyway some special casing of the >> "timer AioContext" to get the deadline in nanoseconds. > > We also need to special case the notifier as it needs to qemu_notify() > rather than aio_notify(). No, not really, because qemu_notify_event() is exactly the same aio_notify(main_loop_context). You do not need to special case the notifier even if TimerListGroup remains separate. >> So let's keep the TimerListGroup for now. > > OK - do you want me to wrap it in a struct? Other than that I think I've > done all the comments in v8. Happy to do that with v10 if there are > other comments on v9. No, it's okay. Unless you want to remove the callback and use aio_notify everywhere. > I note no one has yet commented on the changes to the icount stuff > where a timeout is apparently arbitrarily capped at 2^31 ns (about > 2.1 seconds) in PATCHv9 19/31 - attached below. That's the area > I'm worried about as I'm not sure I understood the code. Yes, that's ok. I'm more worried about the thread safety, but it's not a problem yet. Paolo