All of lore.kernel.org
 help / color / mirror / Atom feed
* Re:Re: patch for virtual machine oriented scheduling(1)
@ 2009-04-23  3:03 alex
  0 siblings, 0 replies; only message in thread
From: alex @ 2009-04-23  3:03 UTC (permalink / raw)
  To: avi, anthony, kvm

>Sorry for that something is wrong with my code posted earlier.
>Just now, I found a bug in it, which was introduced by my porting my
>work(which is developed under KVM83 and using svn depository) to KVM's
>git depository by hand.  The bug is : you can not shutdown SMP guest
>by killing the related qemu process.

the bug is fixed. it seems that once a spinlock is acquired,
Linux2.6.29 prohibits scheduling out
the spinlock holder. so, patch 7 has to be modified:

static void kvm_destroy_vm(struct kvm *kvm)
 {
+       int i;
       struct mm_struct *mm = kvm->mm;

       kvm_arch_sync_events(kvm);
+       if(!kvm->is_paused_by_controller)
+           vm_pause(kvm);
+       for(i = 0; i < KVM_MAX_VCPUS; ++i) {
+           if (kvm->vcpus[i]) {
+               sched_destroy_vcpu(kvm->vcpus[i]);
+           }
+       }
+       sched_destroy_vm(kvm);

       spin_lock(&kvm_lock);
       list_del(&kvm->vm_list);
       spin_unlock(&kvm_lock);

Regards,
alex.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-04-23  3:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-23  3:03 Re:Re: patch for virtual machine oriented scheduling(1) alex

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.