All of lore.kernel.org
 help / color / mirror / Atom feed
From: alex <tomorrowanewday@gmail.com>
To: avi@redhat.com, anthony@codemonkey.ws, kvm@vger.kernel.org
Subject: Re:Re: patch for virtual machine oriented scheduling(1)
Date: Thu, 23 Apr 2009 11:03:28 +0800	[thread overview]
Message-ID: <820ac2e90904222003g531fccdva7cbd1a851dbd935@mail.gmail.com> (raw)

>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.

                 reply	other threads:[~2009-04-23  3:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=820ac2e90904222003g531fccdva7cbd1a851dbd935@mail.gmail.com \
    --to=tomorrowanewday@gmail.com \
    --cc=anthony@codemonkey.ws \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.