WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Fix two issues for CPU online/offline.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix two issues for CPU online/offline.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Apr 2010 01:00:30 -0700
Delivery-date: Fri, 09 Apr 2010 01:05:29 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1270737112 -3600
# Node ID c9e8369e49be7396eca444cfce27e6782e4aa248
# Parent  a33909be109cefb0aef251c7c7e48168ed05512a
Fix two issues for CPU online/offline.

Firstly, we should return if we fail to get spin lock in cpu_down.
Secondly, in credit scheduler, the idlers need be limited only to
online map.

Signed-off-by: Jiang, Yunhong <yunhong.jiang@xxxxxxxxx>
---
 xen/arch/x86/smpboot.c    |    6 ++----
 xen/common/sched_credit.c |    2 +-
 2 files changed, 3 insertions(+), 5 deletions(-)

diff -r a33909be109c -r c9e8369e49be xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Thu Apr 08 15:31:21 2010 +0100
+++ b/xen/arch/x86/smpboot.c    Thu Apr 08 15:31:52 2010 +0100
@@ -1343,10 +1343,8 @@ int cpu_down(unsigned int cpu)
        int err = 0;
 
        /* spin_trylock() avoids deadlock with stop_machine_run(). */
-       if (!spin_trylock(&cpu_add_remove_lock)) {
-               err = -EBUSY;
-               goto out;
-       }
+       if (!spin_trylock(&cpu_add_remove_lock))
+               return -EBUSY;
 
        if (num_online_cpus() == 1) {
                err = -EBUSY;
diff -r a33909be109c -r c9e8369e49be xen/common/sched_credit.c
--- a/xen/common/sched_credit.c Thu Apr 08 15:31:21 2010 +0100
+++ b/xen/common/sched_credit.c Thu Apr 08 15:31:52 2010 +0100
@@ -428,7 +428,7 @@ _csched_cpu_pick(struct vcpu *vc, bool_t
      * like run two VCPUs on co-hyperthreads while there are idle cores
      * or sockets.
      */
-    idlers = csched_priv.idlers;
+    cpus_and(idlers, cpu_online_map, csched_priv.idlers);
     cpu_set(cpu, idlers);
     cpus_and(cpus, cpus, idlers);
     cpu_clear(cpu, cpus);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix two issues for CPU online/offline., Xen patchbot-unstable <=