mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/sched: rtds: report utilization and cap via debug key
Print a cpupool's admitted utilization against its capacity in the 'r' debug ky (xl debug-keys r), so an operator can see the total usage of a cpupool. Signed-off-by: Furkan Caliskan <frn1furkan10@gmail.com> Reviewed-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
1 parent
38e3acece2
commit
5f7bfb20cd
1 file changed
+10
@@ -399,12 +399,22 @@ rt_dump(const struct scheduler *ops)
|
||||
const struct rt_unit *svc;
|
||||
const struct rt_dom *sdom;
|
||||
unsigned long flags;
|
||||
uint64_t cap;
|
||||
|
||||
spin_lock_irqsave(&prv->lock, flags);
|
||||
|
||||
if ( list_empty(&prv->sdom) )
|
||||
goto out;
|
||||
|
||||
cap = (uint64_t)cpumask_weight(ops->cpupool->res_valid) *
|
||||
RTDS_UTIL_SCALE * RTDS_UTIL_CAP_PCT / 100;
|
||||
|
||||
if ( cap )
|
||||
printk("Utilization: %llu%% of capacity\n",
|
||||
(unsigned long long)(prv->utilization * 100 / cap));
|
||||
else
|
||||
printk("Utilization: cpupool has no capacity\n");
|
||||
|
||||
runq = rt_runq(ops);
|
||||
depletedq = rt_depletedq(ops);
|
||||
replq = rt_replq(ops);
|
||||
|
||||