From: Juergen Gross <jgross@suse.com>
To: Dario Faggioli <dario.faggioli@citrix.com>,
Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH v2 3/5] xen: print online pCPUs and free pCPUs when dumping
Date: Wed, 18 Mar 2015 05:29:59 +0100 [thread overview]
Message-ID: <5508FF47.6030503@suse.com> (raw)
In-Reply-To: <20150317153309.9867.20149.stgit@Solace.station>
On 03/17/2015 04:33 PM, Dario Faggioli wrote:
> e.g., with `xl debug-key r', like this:
>
> (XEN) Online Cpus: 0-15
> (XEN) Free Cpus: 8-15
>
> Also, for each cpupool, print the set of pCPUs it
> contains, like this:
>
> (XEN) Cpupool 0:
> (XEN) Cpus: 0-7
> (XEN) Scheduler: SMP Credit Scheduler (credit)
>
> Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: Juergen Gross <jgross@suse.com>
> Cc: Juergen Gross <JGross@suse.com>
> Cc: George Dunlap <george.dunlap@eu.citrix.com>
> Cc: Jan Beulich <JBeulich@suse.com>
> Cc: Keir Fraser <keir@xen.org>
> ---
> Changes from v1:
> * _print_cpumap() becomes print_cpumap() (i.e., the
> leading '_' was not particularly useful in this
> case), as suggested during review
> * changed the output such as (1) we only print the
> maps, not the number of elements, and (2) we avoid
> printing the free cpus map when empty
> * improved the changelog
> ---
> I'm not including any Reviewed-by / Acked-by tag,
> since the patch changed.
> ---
> xen/common/cpupool.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
> index cd6aab9..812a2f9 100644
> --- a/xen/common/cpupool.c
> +++ b/xen/common/cpupool.c
> @@ -17,6 +17,7 @@
> #include <xen/percpu.h>
> #include <xen/sched.h>
> #include <xen/sched-if.h>
> +#include <xen/keyhandler.h>
> #include <xen/cpu.h>
>
> #define for_each_cpupool(ptr) \
> @@ -658,6 +659,12 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op)
> return ret;
> }
>
> +static void print_cpumap(const char *str, const cpumask_t *map)
> +{
> + cpulist_scnprintf(keyhandler_scratch, sizeof(keyhandler_scratch), map);
> + printk("%s: %s\n", str, keyhandler_scratch);
> +}
> +
> void dump_runq(unsigned char key)
> {
> unsigned long flags;
> @@ -671,12 +678,17 @@ void dump_runq(unsigned char key)
> sched_smt_power_savings? "enabled":"disabled");
> printk("NOW=0x%08X%08X\n", (u32)(now>>32), (u32)now);
>
> + print_cpumap("Online Cpus", &cpu_online_map);
> + if ( cpumask_weight(&cpupool_free_cpus) )
> + print_cpumap("Free Cpus", &cpupool_free_cpus);
> +
> printk("Idle cpupool:\n");
> schedule_dump(NULL);
>
> for_each_cpupool(c)
> {
> printk("Cpupool %d:\n", (*c)->cpupool_id);
> + print_cpumap("Cpus", (*c)->cpu_valid);
> schedule_dump(*c);
> }
>
>
>
next prev parent reply other threads:[~2015-03-18 4:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 15:32 [PATCH v2 0/5] Improving dumping of scheduler related info Dario Faggioli
2015-03-17 15:32 ` [PATCH v2 1/5] xen: sched_rt: avoid ASSERT()ing on runq dump if there are no domains Dario Faggioli
2015-03-17 15:33 ` [PATCH v2 2/5] xen: rework locking for dump of scheduler info (debug-key r) Dario Faggioli
2015-03-30 13:34 ` George Dunlap
2015-03-17 15:33 ` [PATCH v2 3/5] xen: print online pCPUs and free pCPUs when dumping Dario Faggioli
2015-03-18 4:29 ` Juergen Gross [this message]
2015-03-18 11:03 ` Jan Beulich
2015-03-18 11:26 ` Dario Faggioli
2015-03-17 15:33 ` [PATCH v2 4/5] xen: sched_credit2: more info " Dario Faggioli
2015-03-17 15:33 ` [PATCH v2 5/5] xen: sched_rt: print useful affinity " Dario Faggioli
2015-03-18 1:09 ` Meng Xu
2015-03-30 13:47 ` George Dunlap
2015-03-31 16:58 ` Dario Faggioli
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=5508FF47.6030503@suse.com \
--to=jgross@suse.com \
--cc=JBeulich@suse.com \
--cc=dario.faggioli@citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox