From: Dario Faggioli Date: Tue, 14 Apr 2015 12:58:52 +0000 (+0200) Subject: sched_credit2: more info when dumping X-Git-Tag: 4.6.0-rc1~802 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=afaa5616f3da457109b37e59e3408dd325cc9e71;p=xen.git sched_credit2: more info when dumping more specifically, for each runqueue, print what pCPUs belong to it, which ones are idle and which ones have been tickled. While there, also convert the whole file to use keyhandler_scratch for printing cpumask-s. Signed-off-by: Dario Faggioli Reviewed-by: George Dunlap --- diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c index b501f28639..75e03215f8 100644 --- a/xen/common/sched_credit2.c +++ b/xen/common/sched_credit2.c @@ -25,6 +25,7 @@ #include #include #include +#include #define d2printk(x...) //#define d2printk printk @@ -1836,7 +1837,7 @@ csched2_dump_pcpu(const struct scheduler *ops, int cpu) unsigned long flags; spinlock_t *lock; int loop; - char cpustr[100]; +#define cpustr keyhandler_scratch /* * We need both locks: @@ -1877,6 +1878,7 @@ csched2_dump_pcpu(const struct scheduler *ops, int cpu) spin_unlock(lock); spin_unlock_irqrestore(&prv->lock, flags); +#undef cpustr } static void @@ -1886,6 +1888,7 @@ csched2_dump(const struct scheduler *ops) struct csched2_private *prv = CSCHED2_PRIV(ops); unsigned long flags; int i, loop; +#define cpustr keyhandler_scratch /* We need the private lock as we access global scheduler data * and (below) the list of active domains. */ @@ -1901,17 +1904,24 @@ csched2_dump(const struct scheduler *ops) fraction = prv->rqd[i].avgload * 100 / (1ULL<load_window_shift); + cpulist_scnprintf(cpustr, sizeof(cpustr), &prv->rqd[i].active); printk("Runqueue %d:\n" "\tncpus = %u\n" + "\tcpus = %s\n" "\tmax_weight = %d\n" "\tinstload = %d\n" "\taveload = %3"PRI_stime"\n", i, cpumask_weight(&prv->rqd[i].active), + cpustr, prv->rqd[i].max_weight, prv->rqd[i].load, fraction); + cpumask_scnprintf(cpustr, sizeof(cpustr), &prv->rqd[i].idle); + printk("\tidlers: %s\n", cpustr); + cpumask_scnprintf(cpustr, sizeof(cpustr), &prv->rqd[i].tickled); + printk("\ttickled: %s\n", cpustr); } printk("Domain info:\n"); @@ -1942,6 +1952,7 @@ csched2_dump(const struct scheduler *ops) } spin_unlock_irqrestore(&prv->lock, flags); +#undef cpustr } static void activate_runqueue(struct csched2_private *prv, int rqi)