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] numa: Small tweaks to domain_update_node_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] numa: Small tweaks to domain_update_node_affinity() and its callers.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 05 Aug 2010 01:35:26 -0700
Delivery-date: Thu, 05 Aug 2010 01:37:07 -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 1280938246 -3600
# Node ID 49254cab8465291dc4ae4465f4dfe7b9c4550609
# Parent  581ebaa7e2da17c23a2dd890943572837a02b29f
numa: Small tweaks to domain_update_node_affinity() and its callers.

From: Andrew Jones <drjones@xxxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/domain.c   |    4 ----
 xen/common/schedule.c |   13 ++++++++++---
 2 files changed, 10 insertions(+), 7 deletions(-)

diff -r 581ebaa7e2da -r 49254cab8465 xen/common/domain.c
--- a/xen/common/domain.c       Wed Aug 04 15:35:28 2010 +0100
+++ b/xen/common/domain.c       Wed Aug 04 17:10:46 2010 +0100
@@ -358,12 +358,8 @@ void domain_update_node_affinity(struct 
         cpus_or(cpumask, cpumask, v->cpu_affinity);
 
     for_each_online_node ( node )
-    {
         if ( cpus_intersects(node_to_cpumask(node), cpumask) )
             node_set(node, nodemask);
-        else
-            node_clear(node, nodemask);
-    }
 
     d->node_affinity = nodemask;
     spin_unlock(&d->node_affinity_lock);
diff -r 581ebaa7e2da -r 49254cab8465 xen/common/schedule.c
--- a/xen/common/schedule.c     Wed Aug 04 15:35:28 2010 +0100
+++ b/xen/common/schedule.c     Wed Aug 04 17:10:46 2010 +0100
@@ -270,13 +270,13 @@ int sched_move_domain(struct domain *d, 
         SCHED_OP(VCPU2OP(v), destroy_vcpu, v);
 
         cpus_setall(v->cpu_affinity);
-        domain_update_node_affinity(d);
         v->processor = new_p;
         v->sched_priv = vcpu_priv[v->vcpu_id];
         evtchn_move_pirqs(v);
 
         new_p = cycle_cpu(new_p, c->cpu_valid);
     }
+    domain_update_node_affinity(d);
 
     d->cpupool = c;
     SCHED_OP(DOM2OP(d), free_domdata, d->sched_priv);
@@ -458,6 +458,7 @@ int cpu_disable_scheduler(unsigned int c
     struct vcpu *v;
     struct cpupool *c;
     int    ret = 0;
+    bool_t affinity_broken;
 
     c = per_cpu(cpupool, cpu);
     if ( c == NULL )
@@ -467,6 +468,8 @@ int cpu_disable_scheduler(unsigned int c
     {
         if ( d->cpupool != c )
             continue;
+
+        affinity_broken = 0;
 
         for_each_vcpu ( d, v )
         {
@@ -478,7 +481,7 @@ int cpu_disable_scheduler(unsigned int c
                 printk("Breaking vcpu affinity for domain %d vcpu %d\n",
                         v->domain->domain_id, v->vcpu_id);
                 cpus_setall(v->cpu_affinity);
-                domain_update_node_affinity(d);
+                affinity_broken = 1;
             }
 
             if ( v->processor == cpu )
@@ -501,7 +504,11 @@ int cpu_disable_scheduler(unsigned int c
             if ( v->processor == cpu )
                 ret = -EAGAIN;
         }
-    }
+
+        if ( affinity_broken )
+            domain_update_node_affinity(d);
+    }
+
     return ret;
 }
 

_______________________________________________
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] numa: Small tweaks to domain_update_node_affinity() and its callers., Xen patchbot-unstable <=