[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen: credit2: insert and tickle don't need a cpu parameter



commit ea53923d35000a8318b4eb5c42e61cbf2db50391
Author:     Dario Faggioli <dario.faggioli@xxxxxxxxxx>
AuthorDate: Wed Jul 6 16:56:28 2016 +0100
Commit:     George Dunlap <george.dunlap@xxxxxxxxxx>
CommitDate: Fri Jul 8 11:04:48 2016 +0100

    xen: credit2: insert and tickle don't need a cpu parameter
    
    In fact, they always operate on the svc->processor of
    the csched2_vcpu passed to them.
    
    No functional change intended.
    
    Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
    Reviewed-by: Anshul Makkar <anshul.makkar@xxxxxxxxxx>
    Acked-by: George Dunlap <george.dunlap@xxxxxxxxxx>
---
 xen/common/sched_credit2.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index ebad734..04c957d 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -518,8 +518,9 @@ __runq_insert(struct list_head *runq, struct csched2_vcpu 
*svc)
 }
 
 static void
-runq_insert(const struct scheduler *ops, unsigned int cpu, struct csched2_vcpu 
*svc)
+runq_insert(const struct scheduler *ops, struct csched2_vcpu *svc)
 {
+    unsigned int cpu = svc->vcpu->processor;
     struct list_head * runq = &RQD(ops, cpu)->runq;
     int pos = 0;
 
@@ -558,17 +559,17 @@ void burn_credits(struct csched2_runqueue_data *rqd, 
struct csched2_vcpu *, s_ti
 /* Check to see if the item on the runqueue is higher priority than what's
  * currently running; if so, wake up the processor */
 static /*inline*/ void
-runq_tickle(const struct scheduler *ops, unsigned int cpu, struct csched2_vcpu 
*new, s_time_t now)
+runq_tickle(const struct scheduler *ops, struct csched2_vcpu *new, s_time_t 
now)
 {
     int i, ipid=-1;
     s_time_t lowest=(1<<30);
+    unsigned int cpu = new->vcpu->processor;
     struct csched2_runqueue_data *rqd = RQD(ops, cpu);
     cpumask_t mask;
     struct csched2_vcpu * cur;
 
     d2printk("rqt %pv curr %pv\n", new->vcpu, current);
 
-    BUG_ON(new->vcpu->processor != cpu);
     BUG_ON(new->rqd != rqd);
 
     /* Look at the cpu it's running on first */
@@ -1071,8 +1072,8 @@ csched2_vcpu_wake(const struct scheduler *ops, struct 
vcpu *vc)
     update_load(ops, svc->rqd, svc, 1, now);
         
     /* Put the VCPU on the runq */
-    runq_insert(ops, vc->processor, svc);
-    runq_tickle(ops, vc->processor, svc, now);
+    runq_insert(ops, svc);
+    runq_tickle(ops, svc, now);
 
 out:
     d2printk("w-\n");
@@ -1104,8 +1105,8 @@ csched2_context_saved(const struct scheduler *ops, struct 
vcpu *vc)
     {
         BUG_ON(__vcpu_on_runq(svc));
 
-        runq_insert(ops, vc->processor, svc);
-        runq_tickle(ops, vc->processor, svc, now);
+        runq_insert(ops, svc);
+        runq_tickle(ops, svc, now);
     }
     else if ( !is_idle_vcpu(vc) )
         update_load(ops, svc->rqd, svc, -1, now);
@@ -1313,8 +1314,8 @@ static void migrate(const struct scheduler *ops,
         if ( on_runq )
         {
             update_load(ops, svc->rqd, NULL, 1, now);
-            runq_insert(ops, svc->vcpu->processor, svc);
-            runq_tickle(ops, svc->vcpu->processor, svc, now);
+            runq_insert(ops, svc);
+            runq_tickle(ops, svc, now);
             SCHED_STAT_CRANK(migrate_on_runq);
         }
         else
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.