On Thu, Apr 24, 2008 at 04:44:27PM +0300, Avi Kivity wrote:
> Chris Lalancette wrote:
> >Avi Kivity wrote:
> >
> >>Ok. __pit_timer_fn() is called from an interrupt, which then calls
> >>smp_call_function_single(), which calls spin_lock(). If we've already
> >>taken the lock, we hang.
> >>
> >>
> >
> >Ah. Just adding a "me too"; I didn't get a chance to debug it yesterday,
> >but I
> >was seeing similar problems. If I disabled in-kernel pit with
> >-no-kvm-pit, all
> >was well.
> >
>
> How to fix it, though? the only idea that comes to mind is to affine
> the hrtimer with vcpu0 (like the local apic timers) which would mean we
> only need to unwait the waitqueue, and never need to send the IPI.
> Would slightly improve performance as well.
Yes, agree.
For now I think just revert
--- a/arch/x86/kvm/i8254.c
+++ b/arch/x86/kvm/i8254.c
@@ -200,10 +200,8 @@ int __pit_timer_fn(struct kvm_kpit_state *ps)
atomic_inc(&pt->pending);
smp_mb__after_atomic_inc();
- if (vcpu0 && waitqueue_active(&vcpu0->wq)) {
- vcpu0->arch.mp_state = KVM_MP_STATE_RUNNABLE;
- wake_up_interruptible(&vcpu0->wq);
- }
+ if (vcpu0)
+ kvm_vcpu_kick(vcpu0);
And add a big fat FIXME.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel