aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/perfc_defn.h
diff options
context:
space:
mode:
authorDario Faggioli <dario.faggioli@citrix.com>2012-12-18 18:10:57 +0000
committerDario Faggioli <dario.faggioli@citrix.com>2012-12-18 18:10:57 +0000
commitebce2d836c6f56e2a90c2794cc9da1a7eb1c43bb (patch)
tree822b1c3b028b873209d1e5f60ed666e2cb964f09 /xen/include/xen/perfc_defn.h
parent750ec2271dca904bf7563725d2aaa78d0c3a78f8 (diff)
downloadxen-ebce2d836c6f56e2a90c2794cc9da1a7eb1c43bb.tar.gz
xen-ebce2d836c6f56e2a90c2794cc9da1a7eb1c43bb.tar.bz2
xen-ebce2d836c6f56e2a90c2794cc9da1a7eb1c43bb.zip
xen: sched_credit: improve tickling of idle CPUs
Right now, when a VCPU wakes-up, we check whether it should preempt what is running on the PCPU, and whether or not the waking VCPU can be migrated (by tickling some idlers). However, this can result in suboptimal or even wrong behaviour, as explained here: http://lists.xen.org/archives/html/xen-devel/2012-10/msg01732.html This change, instead, when deciding which PCPU(s) to tickle, upon VCPU wake-up, considers both what it is likely to happen on the PCPU where the wakeup occurs,and whether or not there are idlers where the woken-up VCPU can run. In fact, if there are, we can avoid interrupting the running VCPU. Only in case there aren't any of these PCPUs, preemption and migration are the way to go. This has been tested (on top of the previous change) by running the following benchmarks inside 2, 6 and 10 VMs, concurrently, on a shared host, each with 2 VCPUs and 960 MB of memory (host had 16 ways and 12 GB RAM). 1) All VMs had 'cpus="all"' in their config file. $ sysbench --test=cpu ... (time, lower is better) | VMs | w/o this change | w/ this change | | 2 | 50.078467 +/- 1.6676162 | 49.673667 +/- 0.0094321 | | 6 | 63.259472 +/- 0.1137586 | 61.680011 +/- 1.0208723 | | 10 | 91.246797 +/- 0.1154008 | 90.396720 +/- 1.5900423 | $ sysbench --test=memory ... (throughput, higher is better) | VMs | w/o this change | w/ this change | | 2 | 485.56333 +/- 6.0527356 | 487.83167 +/- 0.7602850 | | 6 | 401.36278 +/- 1.9745916 | 409.96778 +/- 3.6761092 | | 10 | 294.43933 +/- 0.8064945 | 302.49033 +/- 0.2343978 | $ specjbb2005 ... (throughput, higher is better) | VMs | w/o this change | w/ this change | | 2 | 43150.63 +/- 1359.5616 | 43275.427 +/- 606.28185 | | 6 | 29274.29 +/- 1024.4042 | 29716.189 +/- 1290.1878 | | 10 | 19061.28 +/- 512.88561 | 19192.599 +/- 605.66058 | 2) All VMs had their VCPUs statically pinned to the host's PCPUs. $ sysbench --test=cpu ... (time, lower is better) | VMs | w/o this change | w/ this change | | 2 | 47.8211 +/- 0.0215504 | 47.826900 +/- 0.0077872 | | 6 | 62.689122 +/- 0.0877173 | 62.764539 +/- 0.3882493 | | 10 | 90.321097 +/- 1.4803867 | 89.974570 +/- 1.1437566 | $ sysbench --test=memory ... (throughput, higher is better) | VMs | w/o this change | w/ this change | | 2 | 550.97667 +/- 2.3512355 | 550.87000 +/- 0.8140792 | | 6 | 443.15000 +/- 5.7471797 | 454.01056 +/- 8.4373466 | | 10 | 313.89233 +/- 1.3237493 | 321.81167 +/- 0.3528418 | $ specjbb2005 ... (throughput, higher is better) | 2 | 49591.057 +/- 952.93384 | 49594.195 +/- 799.57976 | | 6 | 33538.247 +/- 1089.2115 | 33671.758 +/- 1077.6806 | | 10 | 21927.870 +/- 831.88742 | 21891.131 +/- 563.37929 | Numbers show how the change has either no or very limited impact (specjbb2005 case) or, when it does have some impact, that is a real improvement in performances (sysbench-memory case). Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com> Acked-by: George Dunlap <george.dunlap@citrix.com> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/xen/perfc_defn.h')
-rw-r--r--xen/include/xen/perfc_defn.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/xen/include/xen/perfc_defn.h b/xen/include/xen/perfc_defn.h
index 2d0254cb29..3ac7b45ac3 100644
--- a/xen/include/xen/perfc_defn.h
+++ b/xen/include/xen/perfc_defn.h
@@ -39,10 +39,6 @@ PERFCOUNTER(vcpu_wake_runnable, "csched: vcpu_wake_runnable")
PERFCOUNTER(vcpu_wake_not_runnable, "csched: vcpu_wake_not_runnable")
PERFCOUNTER(vcpu_park, "csched: vcpu_park")
PERFCOUNTER(vcpu_unpark, "csched: vcpu_unpark")
-PERFCOUNTER(tickle_local_idler, "csched: tickle_local_idler")
-PERFCOUNTER(tickle_local_over, "csched: tickle_local_over")
-PERFCOUNTER(tickle_local_under, "csched: tickle_local_under")
-PERFCOUNTER(tickle_local_other, "csched: tickle_local_other")
PERFCOUNTER(tickle_idlers_none, "csched: tickle_idlers_none")
PERFCOUNTER(tickle_idlers_some, "csched: tickle_idlers_some")
PERFCOUNTER(load_balance_idle, "csched: load_balance_idle")
@@ -52,6 +48,7 @@ PERFCOUNTER(steal_trylock_failed, "csched: steal_trylock_failed")
PERFCOUNTER(steal_peer_idle, "csched: steal_peer_idle")
PERFCOUNTER(migrate_queued, "csched: migrate_queued")
PERFCOUNTER(migrate_running, "csched: migrate_running")
+PERFCOUNTER(migrate_kicked_away, "csched: migrate_kicked_away")
PERFCOUNTER(vcpu_hot, "csched: vcpu_hot")
PERFCOUNTER(need_flush_tlb_flush, "PG_need_flush tlb flushes")