credit2: performance counter for load balancing call
authorPraveen Kumar <kpraveen.lkml@gmail.com>
Wed, 25 Jan 2017 09:51:47 +0000 (10:51 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 25 Jan 2017 09:51:47 +0000 (10:51 +0100)
The patch introduces a new performance counter that counts how many times we go
through the load balancing logic in Credit2.

Signed-off-by: Praveen Kumar <kpraveen.lkml@gmail.com>
Acked-by: Dario Faggioli <dario.faggioli@citrix.com>
xen/common/sched_credit2.c
xen/include/xen/perfc_defn.h

index 2ce738dcd96b70de98076f192ff5ea6c142254bc..b2f2b17ade7f0cf2154ca2607e6f8c90750cf5f9 100644 (file)
@@ -1887,6 +1887,8 @@ retry:
                     (unsigned char *)&d);
     }
 
+    SCHED_STAT_CRANK(acct_load_balance);
+
     /* Look for "swap" which gives the best load average
      * FIXME: O(n^2)! */
 
index 900fddd9d25867db43045f7fb2cd86e699322cd1..0d702f04c83972cbca9f8565b6b49f0e8a14c81b 100644 (file)
@@ -57,6 +57,7 @@ PERFCOUNTER(vcpu_hot,               "csched: vcpu_hot")
 
 /* credit2 specific counters */
 PERFCOUNTER(burn_credits_t2c,       "csched2: burn_credits_t2c")
+PERFCOUNTER(acct_load_balance,      "csched2: acct_load_balance")
 PERFCOUNTER(upd_max_weight_quick,   "csched2: update_max_weight_quick")
 PERFCOUNTER(upd_max_weight_full,    "csched2: update_max_weight_full")
 PERFCOUNTER(migrate_requested,      "csched2: migrate_requested")