From: Ryan Stone <rysto32@gmail.com>
To: Juergen Lock <nox@jelal.kn-bremen.de>
Cc: Mohammed Gamal <m.gamal005@gmail.com>,
freebsd-current@freebsd.org, Jan Kiszka <jan.kiszka@web.de>,
qemu-devel@nongnu.org, Avi Kivity <avi@qumranet.com>
Subject: Re: FreeBSD timing issues and qemu (was: Re: [Qemu-devel] Re: Breakage with local APIC routing)
Date: Mon, 7 Sep 2009 22:17:23 -0400 [thread overview]
Message-ID: <bc2d970909071917n12256d9ucee24327aec3d527@mail.gmail.com> (raw)
In-Reply-To: <20090907205955.GA91866@triton8.kn-bremen.de>
[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]
I'm not entirely clear on why it's done this way, but the timer is run at
twice hz for statistics-gathering purposes*. CPU usage statistics gathering
is driven off of the timer interrupt. Running the timer at twice hz may be
an attempt to eliminate clock-aliasing problems; if so, it's a poor way of
doing so. In any case, seeing interrupts come in at twice hz is expected
behaviour. This means that the guest will be requesting a timer interrupt
rate of twice the granularity that the host's scheduler can support; this
may be the cause of your other timing problems(although I have a hard time
imagining how).
This timer is twice hz behaviour has existed at least since FreeBSD 6.1, so
I can't explain why you see the new behaviour between 7 and 8. You do have
hz set to 1000 on both the guest and host when running 7?
* Actually, from looking at the code the behaviour is dynamic. If hz >=
1500, the timer interrupt rate is set to hz. If 750 <= hz < 1500, the timer
interrupt rate is set to 2 * hz. If hz < 750, the timer interrupt rate is
set to 4 * hz.
[-- Attachment #2: Type: text/html, Size: 1121 bytes --]
next prev parent reply other threads:[~2009-09-08 2:17 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-11 14:28 [Qemu-devel] Breakage with local APIC routing Johannes Schindelin
2008-08-13 8:14 ` [Qemu-devel] " Jan Kiszka
2008-08-13 9:08 ` Jan Kiszka
2008-08-17 15:00 ` Johannes Schindelin
2008-08-17 15:28 ` Johannes Schindelin
2008-08-17 16:52 ` Jan Kiszka
2009-08-13 16:21 ` Johannes Schindelin
2009-08-25 6:56 ` Jan Kiszka
2009-08-25 8:24 ` Mohammed Gamal
2009-08-25 8:59 ` Jan Kiszka
2009-08-25 9:09 ` Mohammed Gamal
2009-08-25 9:33 ` Jan Kiszka
2009-08-25 10:16 ` Mohammed Gamal
2009-08-25 10:21 ` Mohammed Gamal
2009-08-25 10:38 ` Jan Kiszka
2009-08-26 22:10 ` Juergen Lock
2009-08-27 17:56 ` Jan Kiszka
2009-08-29 21:18 ` Juergen Lock
2009-08-31 7:47 ` Jan Kiszka
2009-08-31 21:27 ` Juergen Lock
2009-09-01 20:12 ` Juergen Lock
2009-09-07 20:59 ` FreeBSD timing issues and qemu (was: Re: [Qemu-devel] Re: Breakage with local APIC routing) Juergen Lock
2009-09-08 2:17 ` Ryan Stone [this message]
2009-09-09 20:15 ` Juergen Lock
2009-09-09 20:39 ` Ryan Stone
2009-09-09 20:46 ` Luigi Rizzo
2009-09-10 17:46 ` Juergen Lock
2009-09-10 19:08 ` Luigi Rizzo
2009-09-10 20:44 ` Juergen Lock
2009-09-11 15:22 ` John Baldwin
2009-09-11 17:03 ` Luigi Rizzo
2009-09-11 17:01 ` John Baldwin
2009-09-12 15:48 ` Luigi Rizzo
2009-08-25 11:48 ` [Qemu-devel] Re: Breakage with local APIC routing Johannes Schindelin
2009-08-25 12:31 ` Jan Kiszka
2009-08-25 13:36 ` Johannes Schindelin
2009-08-26 7:31 ` Jan Kiszka
2009-08-26 9:27 ` Avi Kivity
2009-08-27 18:07 ` Jan Kiszka
2008-08-17 17:32 ` [Qemu-devel] " Stefan Weil
2008-08-17 18:58 ` [Qemu-devel] " Jan Kiszka
2008-08-17 20:40 ` Stefan Weil
2008-08-17 20:23 ` [Qemu-devel] " Aurelien Jarno
2008-08-17 21:10 ` Stefan Weil
2008-08-18 14:27 ` Anthony Liguori
2008-08-17 21:14 ` [Qemu-devel] " Jan Kiszka
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=bc2d970909071917n12256d9ucee24327aec3d527@mail.gmail.com \
--to=rysto32@gmail.com \
--cc=avi@qumranet.com \
--cc=freebsd-current@freebsd.org \
--cc=jan.kiszka@web.de \
--cc=m.gamal005@gmail.com \
--cc=nox@jelal.kn-bremen.de \
--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).