From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 6/7] xen: sched_credit2: more info when dumping Date: Mon, 16 Mar 2015 18:50:50 +0000 Message-ID: <5507260A.6050901@eu.citrix.com> References: <20150316165642.10279.86684.stgit@Solace.station> <20150316170536.10279.20927.stgit@Solace.station> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20150316170536.10279.20927.stgit@Solace.station> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli , Xen-devel Cc: Keir Fraser , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 03/16/2015 05:05 PM, Dario Faggioli wrote: > 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-b: Dario Faggioli > Cc: George Dunlap > Cc: Jan Beulich > Cc: Keir Fraser Reviewed-by: George Dunlap > --- > xen/common/sched_credit2.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c > index 564f890..df29438 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 > @@ -1804,7 +1805,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: > @@ -1845,6 +1846,7 @@ csched2_dump_pcpu(const struct scheduler *ops, int cpu) > > spin_unlock(lock); > spin_unlock_irqrestore(&prv->lock, flags); > +#undef cpustr > } > > static void > @@ -1854,6 +1856,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. */ > @@ -1869,17 +1872,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"); > @@ -1910,6 +1920,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) >