]> xenbits.xensource.com Git - people/julieng/xen-unstable.git/commitdiff
credit: remove cpu argument to __runq_insert()
authorHarmandeep Kaur <write.harmandeep@gmail.com>
Wed, 4 Nov 2015 16:46:46 +0000 (17:46 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 4 Nov 2015 16:46:46 +0000 (17:46 +0100)
__runq_insert() takes two arguments, cpu and svc. However,
the cpu argument is redundant because we can get all the
information we need about cpu from svc.

Signed-off-by: Harmandeep Kaur <write.harmandeep@gmail.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
xen/common/sched_credit.c

index 1b30e673860df2b0c08d95744cf5119c02ab8c38..9eb457c65a02580f20f6dc5439305365b9b3dad6 100644 (file)
@@ -252,13 +252,12 @@ __runq_elem(struct list_head *elem)
 }
 
 static inline void
-__runq_insert(unsigned int cpu, struct csched_vcpu *svc)
+__runq_insert(struct csched_vcpu *svc)
 {
-    const struct list_head * const runq = RUNQ(cpu);
+    const struct list_head * const runq = RUNQ(svc->vcpu->processor);
     struct list_head *iter;
 
     BUG_ON( __vcpu_on_runq(svc) );
-    BUG_ON( cpu != svc->vcpu->processor );
 
     list_for_each( iter, runq )
     {
@@ -913,7 +912,7 @@ csched_vcpu_insert(const struct scheduler *ops, struct vcpu *vc)
     struct csched_vcpu *svc = vc->sched_priv;
 
     if ( !__vcpu_on_runq(svc) && vcpu_runnable(vc) && !vc->is_running )
-        __runq_insert(vc->processor, svc);
+        __runq_insert(svc);
 
     SCHED_STAT_CRANK(vcpu_insert);
 }
@@ -1024,7 +1023,7 @@ csched_vcpu_wake(const struct scheduler *ops, struct vcpu *vc)
     }
 
     /* Put the VCPU on the runq and tickle CPUs */
-    __runq_insert(cpu, svc);
+    __runq_insert(svc);
     __runq_tickle(cpu, svc);
 }
 
@@ -1689,7 +1688,7 @@ csched_schedule(
      * Select next runnable local VCPU (ie top of local runq)
      */
     if ( vcpu_runnable(current) )
-        __runq_insert(cpu, scurr);
+        __runq_insert(scurr);
     else
         BUG_ON( is_idle_vcpu(current) || list_empty(runq) );