sched/topology: Rename sched_group_cpus()
There's a discrepancy in naming between the sched_domain and sched_group cpumask accessor. Since we're doing changes, fix it. $ git grep sched_group_cpus | wc -l 28 $ git grep sched_domain_span | wc -l 38 Suggests changing sched_group_cpus() into sched_group_span(): for i in `git grep -l sched_group_cpus` do sed -ie 's/sched_group_cpus/sched_group_span/g' $i done Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:

committed by
Ingo Molnar

parent
e5c14b1fb8
commit
ae4df9d6c9
@@ -5484,12 +5484,12 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p,
|
||||
int i;
|
||||
|
||||
/* Skip over this group if it has no CPUs allowed */
|
||||
if (!cpumask_intersects(sched_group_cpus(group),
|
||||
if (!cpumask_intersects(sched_group_span(group),
|
||||
&p->cpus_allowed))
|
||||
continue;
|
||||
|
||||
local_group = cpumask_test_cpu(this_cpu,
|
||||
sched_group_cpus(group));
|
||||
sched_group_span(group));
|
||||
|
||||
/*
|
||||
* Tally up the load of all CPUs in the group and find
|
||||
@@ -5499,7 +5499,7 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p,
|
||||
runnable_load = 0;
|
||||
max_spare_cap = 0;
|
||||
|
||||
for_each_cpu(i, sched_group_cpus(group)) {
|
||||
for_each_cpu(i, sched_group_span(group)) {
|
||||
/* Bias balancing toward cpus of our domain */
|
||||
if (local_group)
|
||||
load = source_load(i, load_idx);
|
||||
@@ -5602,10 +5602,10 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
|
||||
|
||||
/* Check if we have any choice: */
|
||||
if (group->group_weight == 1)
|
||||
return cpumask_first(sched_group_cpus(group));
|
||||
return cpumask_first(sched_group_span(group));
|
||||
|
||||
/* Traverse only the allowed CPUs */
|
||||
for_each_cpu_and(i, sched_group_cpus(group), &p->cpus_allowed) {
|
||||
for_each_cpu_and(i, sched_group_span(group), &p->cpus_allowed) {
|
||||
if (idle_cpu(i)) {
|
||||
struct rq *rq = cpu_rq(i);
|
||||
struct cpuidle_state *idle = idle_get_state(rq);
|
||||
@@ -7192,7 +7192,7 @@ void update_group_capacity(struct sched_domain *sd, int cpu)
|
||||
* span the current group.
|
||||
*/
|
||||
|
||||
for_each_cpu(cpu, sched_group_cpus(sdg)) {
|
||||
for_each_cpu(cpu, sched_group_span(sdg)) {
|
||||
struct sched_group_capacity *sgc;
|
||||
struct rq *rq = cpu_rq(cpu);
|
||||
|
||||
@@ -7371,7 +7371,7 @@ static inline void update_sg_lb_stats(struct lb_env *env,
|
||||
|
||||
memset(sgs, 0, sizeof(*sgs));
|
||||
|
||||
for_each_cpu_and(i, sched_group_cpus(group), env->cpus) {
|
||||
for_each_cpu_and(i, sched_group_span(group), env->cpus) {
|
||||
struct rq *rq = cpu_rq(i);
|
||||
|
||||
/* Bias balancing toward cpus of our domain */
|
||||
@@ -7535,7 +7535,7 @@ static inline void update_sd_lb_stats(struct lb_env *env, struct sd_lb_stats *sd
|
||||
struct sg_lb_stats *sgs = &tmp_sgs;
|
||||
int local_group;
|
||||
|
||||
local_group = cpumask_test_cpu(env->dst_cpu, sched_group_cpus(sg));
|
||||
local_group = cpumask_test_cpu(env->dst_cpu, sched_group_span(sg));
|
||||
if (local_group) {
|
||||
sds->local = sg;
|
||||
sgs = local;
|
||||
@@ -7890,7 +7890,7 @@ static struct rq *find_busiest_queue(struct lb_env *env,
|
||||
unsigned long busiest_load = 0, busiest_capacity = 1;
|
||||
int i;
|
||||
|
||||
for_each_cpu_and(i, sched_group_cpus(group), env->cpus) {
|
||||
for_each_cpu_and(i, sched_group_span(group), env->cpus) {
|
||||
unsigned long capacity, wl;
|
||||
enum fbq_type rt;
|
||||
|
||||
@@ -8043,7 +8043,7 @@ static int load_balance(int this_cpu, struct rq *this_rq,
|
||||
.sd = sd,
|
||||
.dst_cpu = this_cpu,
|
||||
.dst_rq = this_rq,
|
||||
.dst_grpmask = sched_group_cpus(sd->groups),
|
||||
.dst_grpmask = sched_group_span(sd->groups),
|
||||
.idle = idle,
|
||||
.loop_break = sched_nr_migrate_break,
|
||||
.cpus = cpus,
|
||||
|
Reference in New Issue
Block a user