From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1smi-0000Bx-2c for qemu-devel@nongnu.org; Wed, 24 Jul 2013 02:42:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V1smh-00048k-1P for qemu-devel@nongnu.org; Wed, 24 Jul 2013 02:42:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1758) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V1smg-00048e-Oz for qemu-devel@nongnu.org; Wed, 24 Jul 2013 02:42:50 -0400 Message-ID: <51EF7752.9020505@redhat.com> Date: Wed, 24 Jul 2013 08:42:26 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1374396185-10870-1-git-send-email-pingfank@linux.vnet.ibm.com> <429B80A9A0DBF7FBF05E7C5A@nimrod.local> <628DFBF37B094813C72B6DBF@Ximines.local> <51EE5B34.10507@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 0/8] arm AioContext with its own timer stuff List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: Kevin Wolf , Stefan Hajnoczi , Alex Bligh , Jan Kiszka , qemu-devel@nongnu.org, Anthony Liguori Il 24/07/2013 03:28, liu ping fan ha scritto: > On Tue, Jul 23, 2013 at 6:30 PM, Paolo Bonzini wrote: >> > Il 23/07/2013 04:53, liu ping fan ha scritto: >>> >> The scenior I can figure out is if adopting timeout of poll, then when >>> >> changing the deadline, we need to invoke poll, and set the new >>> >> timeout, right? >> > >> > Yes, you need to call aio_notify so that poll is reinvoked. >> > > I try to list the difference between alarm_timer and timeout of poll. > It includes thread-affinity, resolution and easy-use. > > Most of all, thread-affinity > The main issue with alarm timer is the affinity of timer_t with > threads. For linux, SIGEV_THREAD_ID has been supported for a very long > time and we already associate the signal with the specified thread. So > the only issue is left for other unix, we can emulate the affinity by > using SIGEV_THREAD and repost the event to the specified thread. > As to timeout of poll, it has the affinity of threads. > > Resolution: > alarm_timer provides higher resolution, but do we care about it? With ppoll, is this true or just hearsay? (Without ppoll, indeed setitimer has 1 us resolution while poll has 1 ms; too bad that select has other problems, because select has also 1 us resolution). Paolo > easy-use: > The reset of the deadline as mentioned. > > Finally, I admit timeout of poll will save large chunk of platform-related code.