Re: FreeBSD timing issues and qemu (was: Re: [Qemu-devel] Re: Breakage with local APIC routing)

From: Ryan Stone <rysto32_at_gmail.com>
Date: Mon, 7 Sep 2009 22:17:23 -0400
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.
Received on Tue Sep 08 2009 - 00:17:26 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:55 UTC