Re: kvm guest loops_per_jiffy miscalibration under host load

Marcelo Tosatti
2008-07-12T14:10:54Z

Hi David,

On Fri, Jul 11, 2008 at 03:18:54PM -0600, David S. Ahern wrote:
> What's the status with this for full virt guests?

The consensus seems to be that fullvirt guests need assistance from the
management app (libvirt) to have boosted priority during their boot
stage, so loops_per_jiffy calibration can be performed safely. As Daniel
pointed out this is tricky because you can't know for sure how long the
boot up will take, if for example PXE is used.

Glauber is working on some paravirt patches to remedy the situation.

But loops_per_jiffy is not directly related to clock drifts, so this
is a separate problem.

> I am still seeing systematic time drifts in RHEL 3 and RHEL4 guests
> which I've been digging into it the past few days.

All time drift issues we were aware of are fixed in kvm-70. Can you
please provide more details on how you see the time drifting with
RHEL3/4 guests? It slowly but continually drifts or there are large
drifts at once? Are they using TSC or ACPIPM as clocksource?

Also, most issues we've seen could only be replicated with dyntick
guests.

I'll try to reproduce it locally.

> In the course of it I have been launching guests with boosted priority
> (both nice -20 and realtime priority (RR 1)) on a nearly 100% idle
> host.

Can you also see wacked bogomips without boosting the guest priority?

>
> One host is a PowerEdge 2950 running RHEL5.2 with kvm-70.
> With the realtime priority boot I have routinely seen bogomips in the
> guest which do not make sense. e.g.,
>
> ksyms.2:bogomips : 4639.94
> ksyms.2:bogomips : 4653.05
> ksyms.2:bogomips : 4653.05
> ksyms.2:bogomips : 24.52
>
> and
>
> ksyms.3:bogomips : 4639.94
> ksyms.3:bogomips : 4653.05
> ksyms.3:bogomips : 16.33
> ksyms.3:bogomips : 12.87

I'll look into it.

>
>
> Also, if I launch qemu with the "-no-kvm-pit -tdf" option the panic
> guests panics with the message Marcelo posted at the start of the thread:
>
> ----
>
> Calibrating delay loop... 4653.05 BogoMIPS
>
> CPU: L2 cache: 2048K
>
> Intel machine check reporting enabled on CPU#2.
>
> CPU2: Intel QEMU Virtual CPU version 0.9.1 stepping 03
>
> Booting processor 3/3 eip 2000
>
> Initializing CPU#3
>
> masked ExtINT on CPU#3
>
> ESR value before enabling vector: 00000000
>
> ESR value after enabling vector: 00000000
>
> Calibrating delay loop... 19.60 BogoMIPS
>
> CPU: L2 cache: 2048K
>
> Intel machine check reporting enabled on CPU#3.
>
> CPU3: Intel QEMU Virtual CPU version 0.9.1 stepping 03
>
> Total of 4 processors activated (14031.20 BogoMIPS).
>
> ENABLING IO-APIC IRQs
>
> Setting 4 in the phys_id_present_map
> ...changing IO-APIC physical APIC ID to 4 ... ok.
> ..TIMER: vector=0x31 pin1=0 pin2=-1
> ..MP-BIOS bug: 8254 timer not connected to IO-APIC
> ...trying to set up timer (IRQ0) through the 8259A ... failed.
> ...trying to set up timer as Virtual Wire IRQ... failed.
> ...trying to set up timer as ExtINT IRQ... failed :(.
> Kernel panic: IO-APIC + timer doesn't work! pester mingo@redhat.com
>
> ----
>
> I'm just looking for stable guest times. I'm not planning to keep the
> boosted guest priority, just using it to ensure the guest is not
> interrupted as I try to understand why the guest systematically drifts.
>
> david