|
Re: [PATCH 9/9] KVM: Adds support for halting in the kernel: msg#00555emulators.kvm.devel
Gregory Haskins wrote: > Halting in userspace requires a relatively cumbersome mechanism to signal the > halted VCPU. Implementing halt in kernel should be relatively straight > forward and it eliminates the need for the signaling > > Merging this one in, found some nits: > +/* > * This function is invoked whenever we want to interrupt a vcpu that is > * currently executing in guest-mode. It currently is a no-op because > * the simple delivery of the IPI to execute this function accomplishes our > @@ -2481,6 +2556,16 @@ static void kvm_vcpu_intr(struct kvm_irqsink *this, > BUG_ON(direct_ipi == smp_processor_id()); > ++vcpu->stat.guest_preempt; > } > + > + /* > + * If the CPU is halted it will be waiting for a wake-up > + */ > + if (waitqueue_active(&vcpu->irq.wq)) { > Why do the check? The only reason I can see is to keep the stats correct. Otherwise we can do the body of the if unconditionally. > + wake_up_interruptible_sync(&vcpu->irq.wq); > + set_tsk_need_resched(current); > This is unneeded? I'd expect wake_up_interruptible_sync() to take care of any rescheduling needed. > + ++vcpu->stat.halt_wakeup; > + } > + > -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Is there any accurate way to check if Qemu isusing KVMmodules?: 00555, You, Yongkang |
|---|---|
| Next by Date: | Re: Is there any accurate way to check if Qemu is using KVM modules?: 00555, Avi Kivity |
| Previous by Thread: | Re: Is there any accurate way to check if Qemu is using KVMmodules?i: 00555, Gregory Haskins |
| Next by Thread: | Re: [PATCH 9/9] KVM: Adds support for halting in the kernel: 00555, Gregory Haskins |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |