xen: credit2: kill useless helper function choose_cpu
authorDario Faggioli <dario.faggioli@citrix.com>
Wed, 6 Jul 2016 15:59:41 +0000 (16:59 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Fri, 8 Jul 2016 10:04:48 +0000 (11:04 +0100)
In fact, it has the same signature of csched2_cpu_pick,
which also is its unique caller.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/common/sched_credit2.c

index 04c957df34162b8ab0f787744c1443dbd73e09b0..d07806f28aa0c4e715fa15f22f35f17b68ffbaab 100644 (file)
@@ -321,7 +321,7 @@ struct csched2_dom {
 /*
  * When a hard affinity change occurs, we may not be able to check some
  * (any!) of the other runqueues, when looking for the best new processor
- * for svc (as trylock-s in choose_cpu() can fail). If that happens, we
+ * for svc (as trylock-s in csched2_cpu_pick() can fail). If that happens, we
  * pick, in order of decreasing preference:
  *  - svc's current pcpu;
  *  - another pcpu from svc's current runq;
@@ -1116,7 +1116,7 @@ csched2_context_saved(const struct scheduler *ops, struct vcpu *vc)
 
 #define MAX_LOAD (1ULL<<60);
 static int
-choose_cpu(const struct scheduler *ops, struct vcpu *vc)
+csched2_cpu_pick(const struct scheduler *ops, struct vcpu *vc)
 {
     struct csched2_private *prv = CSCHED2_PRIV(ops);
     int i, min_rqi = -1, new_cpu;
@@ -1490,16 +1490,6 @@ out:
     return;
 }
 
-static int
-csched2_cpu_pick(const struct scheduler *ops, struct vcpu *vc)
-{
-    int new_cpu;
-
-    new_cpu = choose_cpu(ops, vc);
-
-    return new_cpu;
-}
-
 static void
 csched2_vcpu_migrate(
     const struct scheduler *ops, struct vcpu *vc, unsigned int new_cpu)