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] _csched_cpu_pick(): don't write idle bias

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] _csched_cpu_pick(): don't write idle bias more than once
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sun, 20 Mar 2011 06:40:18 +0000
Delivery-date: Sat, 19 Mar 2011 23:41:51 -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 Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1300123187 0
# Node ID 77bb4be5c95430ee3bad473f1c791affaa517034
# Parent  c40da47621d8cb06445e32aa87eba049b1aa5370
_csched_cpu_pick(): don't write idle bias more than once

For the bias to be really meaningful, it should be updated only when
the CPU selected will indeed be returned (and hence used for placing
the vCPU in question).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---


diff -r c40da47621d8 -r 77bb4be5c954 xen/common/sched_credit.c
--- a/xen/common/sched_credit.c Mon Mar 14 17:19:22 2011 +0000
+++ b/xen/common/sched_credit.c Mon Mar 14 17:19:47 2011 +0000
@@ -464,6 +464,7 @@
     cpumask_t cpus;
     cpumask_t idlers;
     cpumask_t *online;
+    struct csched_pcpu *spc = NULL;
     int cpu;
 
     /*
@@ -531,9 +532,8 @@
                   && (weight_cpu * migrate_factor < weight_nxt) ) )
         {
             cpus_and(nxt_idlers, cpus, nxt_idlers);
-            cpu = cycle_cpu(CSCHED_PCPU(nxt)->idle_bias, nxt_idlers);
-            if ( commit )
-               CSCHED_PCPU(nxt)->idle_bias = cpu;
+            spc = CSCHED_PCPU(nxt);
+            cpu = cycle_cpu(spc->idle_bias, nxt_idlers);
             cpus_andnot(cpus, cpus, per_cpu(cpu_sibling_map, cpu));
         }
         else
@@ -542,6 +542,9 @@
         }
     }
 
+    if ( commit && spc )
+       spc->idle_bias = cpu;
+
     return cpu;
 }
 

_______________________________________________
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] _csched_cpu_pick(): don't write idle bias more than once, Xen patchbot-unstable <=