xen/sched: Render sibling/core masks with %pbl to improve 'r' debugkey
PATCH 1/1 xen/sched: Render sibling/core masks with %pbl to improve 'r' debugkey
For system with large numbers of CPUs, the 'r' debugkey is unwieldy. Sibling and core masks are a single block of adjacent bits, so are vastly shorter to render with %pbl.
Before:
(XEN) CPU[00] nr_run=0, sort=157, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff (XEN) CPU[01] nr_run=0, sort=13750, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff (XEN) CPU[02] nr_run=0, sort=188, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000c, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff (XEN) CPU[03] nr_run=0, sort=13730, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000c, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff
After:
(XEN) CPU[00] nr_run=0, sort=1169, sibling={0-1}, core={0-127} (XEN) CPU[01] nr_run=0, sort=2488, sibling={0-1}, core={0-127} (XEN) CPU[02] nr_run=0, sort=1210, sibling={2-3}, core={0-127} (XEN) CPU[03] nr_run=0, sort=2476, sibling={2-3}, core={0-127}
---
CC: Juergen Gross <[email protected]>
CC: Dario Faggioli <[email protected]>
CC: George Dunlap <[email protected]>
4.13 nice-to-have. Not strictly required, but it is a low risk change which improves diagnostics.
--- xen/common/sched_credit.c | 2 +- xen/common/sched_credit2.c | 2 +- xen/common/sched_null.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
xen/common/sched_credit.c +1 -1
@@ -2065,7 +2065,7 @@ csched_dump_pcpu(const struct scheduler *ops, int cpu) spc =CSCHED_PCPU (cpu); runq = &spc->runq; -printk ("CPU[%02d] nr_run=%d, sort=%d, sibling=%*pb, core=%*pb\n" , +printk ("CPU[%02d] nr_run=%d, sort=%d, sibling={%*pbl}, core={%*pbl}\n" , cpu, spc->nr_runnable, spc->runq_sort_last,CPUMASK_PR (per_cpu (cpu_sibling_mask, cpu)),CPUMASK_PR (per_cpu (cpu_core_mask, cpu)));
xen/common/sched_credit2.c +1 -1
@@ -3658,7 +3658,7 @@ dump_pcpu(const struct scheduler *ops, int cpu)struct csched2_private *prv =csched2_priv (ops);struct csched2_unit *svc; -printk ("CPU[%02d] runq=%d, sibling=%*pb, core=%*pb\n" , +printk ("CPU[%02d] runq=%d, sibling={%*pbl}, core={%*pbl}\n" , cpu,c2r (cpu),CPUMASK_PR (per_cpu (cpu_sibling_mask, cpu)),CPUMASK_PR (per_cpu (cpu_core_mask, cpu)));
xen/common/sched_null.c +1 -1
@@ -926,7 +926,7 @@ static void null_dump_pcpu(const struct scheduler *ops, int cpu) lock =pcpu_schedule_lock_irqsave (cpu, &flags); -printk ("CPU[%02d] sibling=%*pb, core=%*pb" , +printk ("CPU[%02d] sibling={%*pbl}, core={%*pbl}" , cpu,CPUMASK_PR (per_cpu (cpu_sibling_mask, cpu)),CPUMASK_PR (per_cpu (cpu_core_mask, cpu)));if (per_cpu (npc, cpu).unit !=NULL )
Signature · 7 lines
2.11.0 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · Andrew Cooper
For system with large numbers of CPUs, the 'r' debugkey is unwieldy. Sibling and core masks are a single block of adjacent bits, so are vastly shorter to render with %pbl.
Before:
(XEN) CPU[00] nr_run=0, sort=157, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff (XEN) CPU[01] nr_run=0, sort=13750, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff (XEN) CPU[02] nr_run=0, sort=188, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000c, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff (XEN) CPU[03] nr_run=0, sort=13730, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000c, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff
Quoted 7 lines
After:
(XEN) CPU[00] nr_run=0, sort=1169, sibling={0-1}, core={0-127} (XEN) CPU[01] nr_run=0, sort=2488, sibling={0-1}, core={0-127} (XEN) CPU[02] nr_run=0, sort=1210, sibling={2-3}, core={0-127} (XEN) CPU[03] nr_run=0, sort=2476, sibling={2-3}, core={0-127}Signed-off-by Andrew Cooper <[email protected]>
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Quoted 10 lines · Andrew Cooper
For system with large numbers of CPUs, the 'r' debugkey is unwieldy. Sibling and core masks are a single block of adjacent bits, so are vastly shorter to render with %pbl.
Before:
(XEN) CPU[00] nr_run=0, sort=157, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff (XEN) CPU[01] nr_run=0, sort=13750, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000003, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff (XEN) CPU[02] nr_run=0, sort=188, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000c, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff (XEN) CPU[03] nr_run=0, sort=13730, sibling=00000000,00000000,00000000,00000000,00000000,00000000,00000000,0000000c, core=00000000,00000000,00000000,00000000,ffffffff,ffffffff,ffffffff,ffffffff
Quoted 7 lines
After:
(XEN) CPU[00] nr_run=0, sort=1169, sibling={0-1}, core={0-127} (XEN) CPU[01] nr_run=0, sort=2488, sibling={0-1}, core={0-127} (XEN) CPU[02] nr_run=0, sort=1210, sibling={2-3}, core={0-127} (XEN) CPU[03] nr_run=0, sort=2476, sibling={2-3}, core={0-127}Signed-off-by Andrew Cooper <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel