Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Peter Portante
On Wed, Sep 19, 2012 at 10:27 AM, Jan Kiszka wrote: > Please turn of HTML in you mailer. It's very hard to parse your reply. > > On 2012-09-19 16:15, Peter Portante wrote: >> On Wed, Sep 19, 2012 at 3:44 AM, Jan Kiszka >> mailto:jan.kis...@siemens.com>> wrote: >> On 2012-09-19 09:26, Paolo Bonzin

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Anthony Liguori
Jan Kiszka writes: > On 2012-09-19 09:26, Paolo Bonzini wrote: >> Il 18/09/2012 22:37, Anthony Liguori ha scritto: >>> Unfortunately, there's a lot of Windows code in qemu-timer.c and main-loop.c >>> right now otherwise the refactoring would be trivial. I'll leave that for >>> another day. >>> >

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Alon Ziv
Jan Kiszka siemens.com> writes: > What would be the advantage of timerfd over select? On Linux, both use > hrtimers (and low slack for RT processes). I'm starting to like the > select/WaitForMultipleObjects pattern as it would allow to consolidate > over basically two versions of timers and simpli

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Avi Kivity
On 09/19/2012 10:44 AM, Jan Kiszka wrote: > On 2012-09-19 09:26, Paolo Bonzini wrote: >> Il 18/09/2012 22:37, Anthony Liguori ha scritto: >>> Unfortunately, there's a lot of Windows code in qemu-timer.c and main-loop.c >>> right now otherwise the refactoring would be trivial. I'll leave that for >

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Stefan Weil
Am 19.09.2012 18:12, schrieb Paolo Bonzini: Il 19/09/2012 18:04, Stefan Weil ha scritto: The win32 timer still works when these modifications were applied. What are they good for? IIUC the Win32 did _not_ work (except on Wine) without these. Note I'm talking about "-clock win32". So these pro

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Paolo Bonzini
Il 19/09/2012 18:04, Stefan Weil ha scritto: > The win32 timer still works when these modifications were applied. > What are they good for? IIUC the Win32 did _not_ work (except on Wine) without these. Note I'm talking about "-clock win32". So these provide a hint that the problem with the Win32

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Stefan Weil
Am 19.09.2012 09:26, schrieb Paolo Bonzini: Il 18/09/2012 22:37, Anthony Liguori ha scritto: Unfortunately, there's a lot of Windows code in qemu-timer.c and main-loop.c right now otherwise the refactoring would be trivial. I'll leave that for another day. Cc: Paolo Bonzini Cc: Jan Kiszka Si

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Jan Kiszka
Please turn of HTML in you mailer. It's very hard to parse your reply. On 2012-09-19 16:15, Peter Portante wrote: > On Wed, Sep 19, 2012 at 3:44 AM, Jan Kiszka > mailto:jan.kis...@siemens.com>> wrote: > On 2012-09-19 09:26, Paolo Bonzini wrote: >> Il 18/09/2012 22:37, Anthony Liguori ha scritto:

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Peter Portante
On Tue, Sep 18, 2012 at 4:37 PM, Anthony Liguori wrote: > timerfd is a new(ish) mechanism provided in the 2.6.25+ Linux kernels that > allows for a high resolution event timer signaled through a file > descriptor. > This patch adds an alarm timer implementation using timerfd. > > timerfd has a cou

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Peter Portante
On Wed, Sep 19, 2012 at 3:44 AM, Jan Kiszka wrote: > On 2012-09-19 09:26, Paolo Bonzini wrote: > > Il 18/09/2012 22:37, Anthony Liguori ha scritto: > >> Unfortunately, there's a lot of Windows code in qemu-timer.c and > main-loop.c > >> right now otherwise the refactoring would be trivial. I'll

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Paolo Bonzini
Il 19/09/2012 09:44, Jan Kiszka ha scritto: >> > Looks good. I think Peter Portante tested something similar, and found no >> > big >> > difference between the two. But it's a good thing and, in my opinion, for >> > non-timerfd OSes we should simply adjust the select() timeout and not >> > both

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Jan Kiszka
On 2012-09-19 09:26, Paolo Bonzini wrote: > Il 18/09/2012 22:37, Anthony Liguori ha scritto: >> Unfortunately, there's a lot of Windows code in qemu-timer.c and main-loop.c >> right now otherwise the refactoring would be trivial. I'll leave that for >> another day. >> >> Cc: Paolo Bonzini >> Cc:

Re: [Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-19 Thread Paolo Bonzini
Il 18/09/2012 22:37, Anthony Liguori ha scritto: > Unfortunately, there's a lot of Windows code in qemu-timer.c and main-loop.c > right now otherwise the refactoring would be trivial. I'll leave that for > another day. > > Cc: Paolo Bonzini > Cc: Jan Kiszka > Signed-off-by: Anthony Liguori > -

[Qemu-devel] [PATCH] qemu-clock: add an alarm timer based on timerfd

2012-09-18 Thread Anthony Liguori
timerfd is a new(ish) mechanism provided in the 2.6.25+ Linux kernels that allows for a high resolution event timer signaled through a file descriptor. This patch adds an alarm timer implementation using timerfd. timerfd has a couple advantages over dynticks. Namely, it's fd based instead of sign