aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2015-02-13 17:37:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-14 00:21:37 -0500
commit333470ee46b6851477dc9392eb71ba8ffa4f3387 (patch)
treea66ef9a7c1990fdca9a40051a852211c27ceaf24 /kernel/sched/core.c
parentad853b48cb4650285e8544eebbba5bbd9274ee15 (diff)
sched: use %*pb[l] to print bitmaps including cpumasks and nodemasks
printk and friends can now format bitmaps using '%*pb[l]'. cpumask and nodemask also provide cpumask_pr_args() and nodemask_pr_args() respectively which can be used to generate the two printf arguments necessary to format the specified cpu/nodemask. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 1f37fe7f77a4..13049aac05a6 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5462,9 +5462,7 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
5462 struct cpumask *groupmask) 5462 struct cpumask *groupmask)
5463{ 5463{
5464 struct sched_group *group = sd->groups; 5464 struct sched_group *group = sd->groups;
5465 char str[256];
5466 5465
5467 cpulist_scnprintf(str, sizeof(str), sched_domain_span(sd));
5468 cpumask_clear(groupmask); 5466 cpumask_clear(groupmask);
5469 5467
5470 printk(KERN_DEBUG "%*s domain %d: ", level, "", level); 5468 printk(KERN_DEBUG "%*s domain %d: ", level, "", level);
@@ -5477,7 +5475,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
5477 return -1; 5475 return -1;
5478 } 5476 }
5479 5477
5480 printk(KERN_CONT "span %s level %s\n", str, sd->name); 5478 printk(KERN_CONT "span %*pbl level %s\n",
5479 cpumask_pr_args(sched_domain_span(sd)), sd->name);
5481 5480
5482 if (!cpumask_test_cpu(cpu, sched_domain_span(sd))) { 5481 if (!cpumask_test_cpu(cpu, sched_domain_span(sd))) {
5483 printk(KERN_ERR "ERROR: domain->span does not contain " 5482 printk(KERN_ERR "ERROR: domain->span does not contain "
@@ -5522,9 +5521,8 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
5522 5521
5523 cpumask_or(groupmask, groupmask, sched_group_cpus(group)); 5522 cpumask_or(groupmask, groupmask, sched_group_cpus(group));
5524 5523
5525 cpulist_scnprintf(str, sizeof(str), sched_group_cpus(group)); 5524 printk(KERN_CONT " %*pbl",
5526 5525 cpumask_pr_args(sched_group_cpus(group)));
5527 printk(KERN_CONT " %s", str);
5528 if (group->sgc->capacity != SCHED_CAPACITY_SCALE) { 5526 if (group->sgc->capacity != SCHED_CAPACITY_SCALE) {
5529 printk(KERN_CONT " (cpu_capacity = %d)", 5527 printk(KERN_CONT " (cpu_capacity = %d)",
5530 group->sgc->capacity); 5528 group->sgc->capacity);