Hollis Blanchard wrote: > On Mon, 2008-11-24 at 21:41 -0700, David S. Ahern wrote: >> RHEL3 (which is based on the 2.4.21 kernel) gets microsecond >> resolutions >> by reading the TSC. Reading the TSC from within a guest is very fast >> on kvm. >> >> RHEL4 (which is basd on the 2.6.9 kernel) allows multiple time >> sources: >> pmtmr (ACPI power management timer which is the default), pit, hpet >> and TSC. >> >> The pmtmr and pit both do ioport reads to get microsecond resolutions >> (see read_pmtmr and get_offset_pit, respectively). For the tsc as the >> timer source gettimeofday is *very* lightweight, but time drifts very >> badly and ntpd cannot acquire a sync. > > Why aren't you seeing severe time drift when using RHEL3 guests with the > TSC time source? >
With RHEL3 it's a PIT time source, and the PIT counter is only read on interrupts. For gettimeofday requests only the tsc is read; the algorithm for microsecond resolution uses the pit count and its tsc timestamp from the last interrupt. In RHEL4, the PIT counter is read for each gettimeofday request when it is the timer source. That's the cause of the extra overhead, and consequently, worse performance. david -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
