On Tue, Aug 02, 2011 at 04:47:08PM +0200, Alexander Graf wrote:

> >  int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu, struct kvm_interrupt 
> > *irq)
> >  {
> >-    if (irq->irq == KVM_INTERRUPT_UNSET)
> >+    if (irq->irq == KVM_INTERRUPT_UNSET) {
> >             kvmppc_core_dequeue_external(vcpu, irq);
> >-    else
> >-            kvmppc_core_queue_external(vcpu, irq);
> >+            return 0;
> >+    }
> 
> Not sure I understand this part. Mind to explain?

It's a micro-optimization - we don't really need to wake up or
interrupt the vcpu thread when we're clearing the interrupt.
Unless of course I'm missing something... :)

> 
> Alex
> 
> >+
> >+    kvmppc_core_queue_external(vcpu, irq);
> >
> >-    if (waitqueue_active(&vcpu->wq)) {
> >-            wake_up_interruptible(&vcpu->wq);
> >+    if (waitqueue_active(vcpu->arch.wqp)) {
> >+            wake_up_interruptible(vcpu->arch.wqp);
> >             vcpu->stat.halt_wakeup++;
> >     } else if (vcpu->cpu != -1) {
> >             smp_send_reschedule(vcpu->cpu);

Paul.
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to