[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 4/7] xen: print online pCPUs and free pCPUs when dumping scheduler info
On 03/16/2015 06:05 PM, Dario Faggioli wrote: e.g., with `xl debug-key r'. This change adds something like the following lines to the dump output: (XEN) Num online Cpus: 16, cpu_online_map: 0-15 (XEN) Num free Cpus: 8, cpupool_free_cpus: 8-15 Meaning there are 16 pCPUs online, and they are pCPUs 0-15, and that 8 of them, more specifically 8-15, are not part of any cpupool. Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx> Cc: Juergen Gross <JGross@xxxxxxxx> Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx> Cc: Jan Beulich <JBeulich@xxxxxxxx> Cc: Keir Fraser <keir@xxxxxxx> Acked-by: Juergen Gross <jgross@xxxxxxxx> --- xen/common/cpupool.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c index cd6aab9..3bf0174 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,18 @@ void dump_runq(unsigned char key) sched_smt_power_savings? "enabled":"disabled"); printk("NOW=0x%08X%08X\n", (u32)(now>>32), (u32)now); + printk("Num online Cpus: %d, ", cpumask_weight(&cpu_online_map)); + _print_cpumap("cpu_online_map", &cpu_online_map); + printk("Num free Cpus: %d, ", cpumask_weight(&cpupool_free_cpus)); + _print_cpumap("cpupool_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); } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |