public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Clock off in guest
@ 2008-02-13 12:52 koen
  2008-02-13 17:58 ` Uri Lublin
  0 siblings, 1 reply; 13+ messages in thread
From: koen @ 2008-02-13 12:52 UTC (permalink / raw)
  To: Uri Lublin; +Cc: kvm-devel

> This would not work if you are using an old version of kvm ( with no
> in-kernel-apic )
> I recommend upgrading to kvm-60 (or latest linux kernel).

Should I upgrade the guest kernel or the host kernel? My bet is the host
kernel, but the clocksource=tsc applies to the guest, so I'm not really
sure...

> Or as an alternative, probably not as good, sometimes (when the guest's
> clocksource is PIT) adding '-tdf' to the command line helps.

I cannot find this in man kvm or man qemu. Should I add this to the
command line that starts the guest?

Best,
Koen


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Clock off in guest
@ 2008-02-13 16:13 koen
  0 siblings, 0 replies; 13+ messages in thread
From: koen @ 2008-02-13 16:13 UTC (permalink / raw)
  To: Dan Kenigsberg; +Cc: kvm-devel

> On Wed, Feb 13, 2008 at 02:00:38PM +0100, koen@vermeer.tv wrote:
>> > What is the clock source of your guest? If it is the traditional PIT,
>> > you describe a known problem in busy hosts. You may try to set
>> > clocksource=tsc in the guest kerenl parameters.
>> Thanks for your reply. I tried looking for PIT in dmesg, which didn't
>> give
>> me anything. Then I tried 'dmesg|grep -i tsc' and I got
>> Time: tsc clocksource has been installed.
> If this was done in the guest then, yes, your guest's clocksource is
> tsc.

Yes, this was done on the guest. The host shows

Marking TSC unstable due to TSCs unsynchronized
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 31
hpet0: 3 32-bit timers, 25000000 Hz
Time: hpet clocksource has been installed.

> However, as Uri mentioned earlier, this is useful only with newer KVMs.
> I assume that your host runs the kvm from 2.6.23 which is pretty old in
> kvm timescale. Try downloading kvm-60, insmod it to your host and try
> running your guest.

I'll try building a kvm-60 module, run the guest with that and report the
results. I cannot do that immediately, though, because people are actually
using the guest system.

Best,
Koen


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: Clock off in guest
@ 2008-02-13 13:00 koen
  2008-02-13 15:55 ` Dan Kenigsberg
  0 siblings, 1 reply; 13+ messages in thread
From: koen @ 2008-02-13 13:00 UTC (permalink / raw)
  To: Dan Kenigsberg; +Cc: kvm-devel

Hi Dan,

> On Wed, Feb 13, 2008 at 10:41:44AM +0100, Koen Vermeer wrote:
>> I'm running an Linux AMD64 guest on an AMD64 host. The host is running a
>> 2.6.23 kernel (self compiled), the guest is running a stock
>> linux-image-2.6.22-3-amd64 Debian kernel.
>> My problem is that the clock on the guest is off (slow), while the clock
>> on the host seems to be OK. When doing 'time sleep 10' on the guest, it
>> takes about 16 'real' seconds for it to finish.
> What is the clock source of your guest? If it is the traditional PIT,
> you describe a known problem in busy hosts. You may try to set
> clocksource=tsc in the guest kerenl parameters.

Thanks for your reply. I tried looking for PIT in dmesg, which didn't give
me anything. Then I tried 'dmesg|grep -i tsc' and I got

Time: tsc clocksource has been installed.

I then ran 'dmesg|grep -i clock' and got

ACPI: PM-Timer IO Port: 0xb008
time.c: Detected 1803.751 MHz processor.
Calibrating delay using timer specific routine.. 14442.19 BogoMIPS
(lpj=28884398)
Using local APIC timer interrupts.
Detected 62.628 MHz APIC timer.
* Found PM-Timer Bug on the chipset. Due to workarounds for a bug,
Time: tsc clocksource has been installed.
Real Time Clock Driver v1.12ac
PCI: Setting latency timer of device 0000:00:01.1 to 64
PCI: Setting latency timer of device 0000:00:01.2 to 64

The kernel command line is rather simple: root=/dev/hda1 ro quiet

Does that answer your question, or should I be looking somewhere else?

Thanks!

Koen


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 13+ messages in thread
* Clock off in guest
@ 2008-02-13  9:41 Koen Vermeer
  2008-02-13 11:25 ` Dan Kenigsberg
  0 siblings, 1 reply; 13+ messages in thread
From: Koen Vermeer @ 2008-02-13  9:41 UTC (permalink / raw)
  To: kvm-devel

Hi,

I'm running an Linux AMD64 guest on an AMD64 host. The host is running a
2.6.23 kernel (self compiled), the guest is running a stock
linux-image-2.6.22-3-amd64 Debian kernel.

My problem is that the clock on the guest is off (slow), while the clock
on the host seems to be OK. When doing 'time sleep 10' on the guest, it
takes about 16 'real' seconds for it to finish.

I can change the host kernel, the guest kernel or fiddle around with kvm
command line options, but I would like some guidance where to start.
Which option has the largest probability of solving my problem? Let me
know if you need some dmesg output or some other log data; I didn't want
to flood the list with random logs of both the host and the guest.

Best,
Koen



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-02-22 14:38 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 12:52 Clock off in guest koen
2008-02-13 17:58 ` Uri Lublin
2008-02-14  9:10   ` Koen Vermeer
  -- strict thread matches above, loose matches on Subject: below --
2008-02-13 16:13 koen
2008-02-13 13:00 koen
2008-02-13 15:55 ` Dan Kenigsberg
2008-02-13 17:07   ` Koen Vermeer
2008-02-13 18:04     ` Dan Kenigsberg
2008-02-14 12:51       ` Koen Vermeer
2008-02-22 14:38         ` Steven Mooij
2008-02-13  9:41 Koen Vermeer
2008-02-13 11:25 ` Dan Kenigsberg
2008-02-13 12:00   ` Uri Lublin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox