All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Juergen Gross <jgross@suse.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	Dario Faggioli <dfaggioli@suse.com>
Subject: [Xen-devel] [PATCH for-4.13] xen/sched: Render sibling/core masks with %pbl to improve 'r' debugkey
Date: Wed, 13 Nov 2019 18:36:41 +0000	[thread overview]
Message-ID: <20191113183641.2871-1-andrew.cooper3@citrix.com> (raw)

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}

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Juergen Gross <jgross@suse.com>
CC: Dario Faggioli <dfaggioli@suse.com>
CC: George Dunlap <george.dunlap@eu.citrix.com>

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(-)

diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
index 645cdc5e9a..aa41a3301b 100644
--- a/xen/common/sched_credit.c
+++ b/xen/common/sched_credit.c
@@ -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)));
diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index af58ee161d..f7c477053c 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -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)));
diff --git a/xen/common/sched_null.c b/xen/common/sched_null.c
index da3fe29f21..3f3418c9b1 100644
--- a/xen/common/sched_null.c
+++ b/xen/common/sched_null.c
@@ -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 )
-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

             reply	other threads:[~2019-11-13 18:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13 18:36 Andrew Cooper [this message]
2019-11-14  7:53 ` [Xen-devel] [PATCH for-4.13] xen/sched: Render sibling/core masks with %pbl to improve 'r' debugkey Jürgen Groß
2019-11-14 15:04 ` George Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191113183641.2871-1-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=dfaggioli@suse.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=jgross@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.