Received: from eggs.gnu.org ([2001:4830:134:3::10]:37100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1u0r-0005Ah-VY for qemu-devel@nongnu.org; Wed, 24 Jul 2013 04:01:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1u0q-0001rs-GB for qemu-devel@nongnu.org; Wed, 24 Jul 2013 04:01:33 -0400 Received: from mail.avalus.com ([2001:41c8:10:1dd::10]:53446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1u0q-0001rg-AO for qemu-devel@nongnu.org; Wed, 24 Jul 2013 04:01:32 -0400 Date: Wed, 24 Jul 2013 09:01:22 +0100 From: Alex Bligh Message-ID: <0C1B02FD6461BD119735B002@nimrod.local> In-Reply-To: <51EF85A0.6070307@redhat.com> References: <1374396185-10870-1-git-send-email-pingfank@linux.vnet.ibm.com> <429B80A9A0DBF7FBF05E7C5A@nimrod.local> <628DFBF37B094813C72B6DBF@Ximines.local> <51EE5B34.10507@redhat.com> <51EF7752.9020505@redhat.com> <11E9299201E9A8D837D212DB@nimrod.local> <51EF85A0.6070307@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 0/8] arm AioContext with its own timer stuff Reply-To: Alex Bligh List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Stefan Hajnoczi , Alex Bligh , Jan Kiszka , liu ping fan , qemu-devel@nongnu.org, Anthony Liguori Paolo, --On 24 July 2013 09:43:28 +0200 Paolo Bonzini wrote: >> Most 'reasonable' POSIX compliant operating systems have ppoll > > Really? I could find no manpages for any of Solaris and *BSD. OK I shall (re)research that then! I suppose select() / pselect() is an alternative when there are few FDs. >> , my concern was mainly about >> Windows (which I know very little about), as there does not appear >> to be a nanosecond or even microsecond alternative to >> WaitForMultipleObjects. However, articles like this: >> >> http://social.msdn.microsoft.com/Forums/vstudio/en-US/e8a7cb1e-9edd-4ee3 >> -982e-f66b7bf6ae44/improve-accuracy-waitforsingleobject >> >> suggest that WaitFor{Single,Multiple}Objects can have pretty >> appalling latency anyway (100ms!), and there's no evidence that's >> limited by making one of the FDs (or objects) ready. > > ... especially when making one of the FDs ready would likely have the > same latency in some internal Windows thread that implements timers. > >> In these >> circumstances, I'd question whether we gain anything by worrying >> about timer resolution. > > Part of it should be fixed by os_setup_early_signal_handling. > > This is corroborated by the fact that without > os_setup_early_signal_handling Wine always works, and Windows breaks. This: http://www.windowstimestamp.com/description suggests that whilst WaitForMultipleEvents has a millisecond timeout, one can (see section 3.2) use these to wait for an object which is itself a timer and expires with - in this case - 100ns resolution which is probably enough. Again I know nothing about Windows so this may be completely wrong. -- Alex Bligh