Re: [Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-26 Thread Jamie Lokier
Paul Brook wrote: > On Wednesday 26 April 2006 14:01, Jamie Lokier wrote: > > Paul Brook wrote: > > > One solution (which is also desirable for other reasons) is to > > > implement some form of guest cycle counting based on the > > > instructions actually executed. Then use that as the high-precis

Re: [Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-26 Thread Paul Brook
On Wednesday 26 April 2006 14:01, Jamie Lokier wrote: > Paul Brook wrote: > > One solution (which is also desirable for other reasons) is to > > implement some form of guest cycle counting based on the > > instructions actually executed. Then use that as the high-precision > > timesource, and use

Re: [Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-26 Thread Jamie Lokier
Paul Brook wrote: > One solution (which is also desirable for other reasons) is to > implement some form of guest cycle counting based on the > instructions actually executed. Then use that as the high-precision > timesource, and use some for of adaptive method to keep host and > guest clocks in s

Re: [Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-25 Thread Paul Brook
> > QEMU reads the clock at each host wakeup, but it cannot compensate if > > the guest OS requires a higher frequency than the host timer frequency. > > Having a 1 ms period is definitively better to be able to run a wide > > range of guest OSes. > > I was thinking that if the host is woken later

Re: [Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-25 Thread Jamie Lokier
Fabrice Bellard wrote: > Jamie Lokier wrote: > >Fabrice Bellard wrote: > > > >>Can other people confirm that it is better to always use /dev/rtc on > >>Linux ? Is there a way to get the real resolution of the host timer ? > > > > > >Yes, on recent Linux kernels you can do > >clock_getres(CLOCK_MON

Re: [Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-25 Thread Fabrice Bellard
Jamie Lokier wrote: Fabrice Bellard wrote: Can other people confirm that it is better to always use /dev/rtc on Linux ? Is there a way to get the real resolution of the host timer ? Yes, on recent Linux kernels you can do clock_getres(CLOCK_MONOTONIC,&ts) [or CLOCK_REALTIME], and it will ret

Re: [Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-25 Thread NyOS
On Mon, 24 Apr 2006 23:41:23 +0200, Fabrice Bellard <[EMAIL PROTECTED]> wrote: Hi, Can other people confirm that it is better to always use /dev/rtc on Linux ? Is there a way to get the real resolution of the host timer ? Fabrice. Hi! There must be one. Mplayer says this after setting

Re: [Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-24 Thread Jamie Lokier
Fabrice Bellard wrote: > Can other people confirm that it is better to always use /dev/rtc on > Linux ? Is there a way to get the real resolution of the host timer ? Yes, on recent Linux kernels you can do clock_getres(CLOCK_MONOTONIC,&ts) [or CLOCK_REALTIME], and it will return the length of a t

Re: [Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-24 Thread Fabrice Bellard
Hi, Can other people confirm that it is better to always use /dev/rtc on Linux ? Is there a way to get the real resolution of the host timer ? Fabrice. Kazu wrote: Hi, I made a little patch of timer/clock for Linux host. It always trys to use /dev/rtc. getitimer doesn't report a correct int

[Qemu-devel] [PATCH] Timer/clock for Linux

2006-04-11 Thread Kazu
Hi, I made a little patch of timer/clock for Linux host. It always trys to use /dev/rtc. getitimer doesn't report a correct interval value. http://www.h7.dion.ne.jp/~qemu-win/download/qemu-20060407-linux-timer.patch To get a precise timer/clock., do: (1) Set max-user-freq 1024 as root. [Linux h