]> xenbits.xensource.com Git - people/gdunlap/xen.git/commitdiff
sched: make counters for vCPU tickling generic
authorDario Faggioli <dario.faggioli@citrix.com>
Tue, 17 Mar 2015 09:57:23 +0000 (10:57 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Mar 2015 09:57:23 +0000 (10:57 +0100)
and update them from Credit2 and RTDS schedulers.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: Meng Xu <mengxu@cis.upenn.edu>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/sched_credit2.c
xen/common/sched_rt.c
xen/include/xen/perfc_defn.h

index 7655ad4c4c1d4dfd338cadce599665a7b18f8dd6..14abbb6b1f2a923128a31f5fbbe59060d1891bd0 100644 (file)
@@ -556,7 +556,10 @@ runq_tickle(const struct scheduler *ops, unsigned int cpu, struct csched2_vcpu *
     /* Only switch to another processor if the credit difference is greater
      * than the migrate resistance */
     if ( ipid == -1 || lowest + CSCHED2_MIGRATE_RESIST > new->credit )
+    {
+        SCHED_STAT_CRANK(tickle_idlers_none);
         goto no_tickle;
+    }
 
 tickle:
     BUG_ON(ipid == -1);
@@ -571,6 +574,7 @@ tickle:
                   (unsigned char *)&d);
     }
     cpumask_set_cpu(ipid, &rqd->tickled);
+    SCHED_STAT_CRANK(tickle_idlers_some);
     cpu_raise_softirq(ipid, SCHEDULE_SOFTIRQ);
 
 no_tickle:
index 49d1b830c631431f4dc9cf78cc8be7e21514ed4f..2ad0c68d4b54eac145fba53476125eecb64ceff0 100644 (file)
@@ -929,6 +929,7 @@ runq_tickle(const struct scheduler *ops, struct rt_vcpu *new)
     }
 
     /* didn't tickle any cpu */
+    SCHED_STAT_CRANK(tickle_idlers_none);
     return;
 out:
     /* TRACE */
@@ -944,6 +945,7 @@ out:
     }
 
     cpumask_set_cpu(cpu_to_tickle, &prv->tickled);
+    SCHED_STAT_CRANK(tickle_idlers_some);
     cpu_raise_softirq(cpu_to_tickle, SCHEDULE_SOFTIRQ);
     return;
 }
index 2dc78fe848fbfa655df4cae04e6fa4b939f63e13..f7543314c10c2b17d22b602b4a7823343c61e22e 100644 (file)
@@ -26,6 +26,8 @@ PERFCOUNTER(vcpu_wake_running,      "sched: vcpu_wake_running")
 PERFCOUNTER(vcpu_wake_onrunq,       "sched: vcpu_wake_onrunq")
 PERFCOUNTER(vcpu_wake_runnable,     "sched: vcpu_wake_runnable")
 PERFCOUNTER(vcpu_wake_not_runnable, "sched: vcpu_wake_not_runnable")
+PERFCOUNTER(tickle_idlers_none,     "sched: tickle_idlers_none")
+PERFCOUNTER(tickle_idlers_some,     "sched: tickle_idlers_some")
 
 /* credit specific counters */
 PERFCOUNTER(delay_ms,               "csched: delay")
@@ -39,8 +41,6 @@ PERFCOUNTER(acct_vcpu_active,       "csched: acct_vcpu_active")
 PERFCOUNTER(acct_vcpu_idle,         "csched: acct_vcpu_idle")
 PERFCOUNTER(vcpu_park,              "csched: vcpu_park")
 PERFCOUNTER(vcpu_unpark,            "csched: vcpu_unpark")
-PERFCOUNTER(tickle_idlers_none,     "csched: tickle_idlers_none")
-PERFCOUNTER(tickle_idlers_some,     "csched: tickle_idlers_some")
 PERFCOUNTER(load_balance_idle,      "csched: load_balance_idle")
 PERFCOUNTER(load_balance_over,      "csched: load_balance_over")
 PERFCOUNTER(load_balance_other,     "csched: load_balance_other")