From: Fabrice Bellard <fabrice@bellard.org>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Timer/clock for Linux
Date: Mon, 24 Apr 2006 23:41:23 +0200 [thread overview]
Message-ID: <444D4603.6090007@bellard.org> (raw)
In-Reply-To: <001501c65dd6$484d7c60$0464a8c0@athlon>
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 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 host] # echo 1024 > /proc/sys/dev/rtc/max-user-freq
>
> It is necessary to set it everytime you reboot the host OS. Write it to
> /etc/rc.d/rc.local.
>
> (2) Apply the patch and build a binary.
>
> (1) is necessary and (2) is optional. I think latest kernel doesn't need the
> patch. When I use 2.6.11-1.11369_FC4 host, it is necessary to apply (2). But
> when 2.6.15-1.1831_FC4 host, it is not.
>
> If you don't set max-user-freq, the clock in Windows 2000 guest is unstable
> while IE is running.
>
> Timer uses RTC(Real Time Clock). If it can not be used, setitimer/getitimer
> are used.
> If the timer's interval is set to 999 us, the interval becomes 2ms. It is
> the
> cause that a guest OS clock is 1/2 slow than the real time. Recent Linux
> kernel is 4ms and clock is 1/4 slow.
>
>
> Tested environments are:
> Windows 2000 guest /FC4 kernel-2.6.11-1.1831_FC4 host
> FC4-i386-rescuecd.iso guest/FC4 kernel-2.6.11-1.1831_FC4 host
>
> Windows 2000 guest /FC4 kernel-2.6.15-1.1831_FC4 host
> FC4-i386-rescuecd.iso guest/FC4 kernel-2.6.15-1.1831_FC4 host
>
> I have not tested Linux 2.4 host.
> The clock of guest OS on x86_64 host is unstable. 1ms interval interrupts
> occure but the clock in Windows 2000 guest on x86_64 host doesn't work well.
>
> Regards,
> Kazu
>
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
next prev parent reply other threads:[~2006-04-24 21:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 2:10 [Qemu-devel] [PATCH] Timer/clock for Linux Kazu
[not found] ` <443E93A3.5060508@weilnetz.de>
2006-04-13 18:11 ` [Qemu-devel] [PATCH] Fix message in configure Stefan Weil
2006-04-24 21:41 ` Fabrice Bellard [this message]
2006-04-25 0:16 ` [Qemu-devel] [PATCH] Timer/clock for Linux Jamie Lokier
2006-04-25 21:10 ` Fabrice Bellard
2006-04-25 21:34 ` Jamie Lokier
2006-04-25 21:49 ` Paul Brook
2006-04-26 13:01 ` Jamie Lokier
2006-04-26 14:21 ` Paul Brook
2006-04-26 17:26 ` Jamie Lokier
2006-04-25 11:04 ` NyOS
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=444D4603.6090007@bellard.org \
--to=fabrice@bellard.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).