[PATCH 09/12] sched: Seperate out build of CPU sched groups from__build_sched_domains

From: Andreas Herrmann
Date: Tue Aug 18 2009 - 06:59:45 EST



... to further strip down __build_sched_domains().

Signed-off-by: Andreas Herrmann <andreas.herrmann3@xxxxxxx>
---
kernel/sched.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/kernel/sched.c b/kernel/sched.c
index d045e5c..666017b 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -8692,6 +8692,13 @@ static void build_sched_groups(struct s_data *d, enum sched_domain_level l,
d->send_covered, d->tmpmask);
break;
#endif
+ case SD_LV_CPU: /* set up physical groups */
+ cpumask_and(d->nodemask, cpumask_of_node(cpu), cpu_map);
+ if (!cpumask_empty(d->nodemask))
+ init_sched_build_groups(d->nodemask, cpu_map,
+ &cpu_to_phys_group,
+ d->send_covered, d->tmpmask);
+ break;
default:
break;
}
@@ -8737,15 +8744,8 @@ static int __build_sched_domains(const struct cpumask *cpu_map,
}

/* Set up physical groups */
- for (i = 0; i < nr_node_ids; i++) {
- cpumask_and(d.nodemask, cpumask_of_node(i), cpu_map);
- if (cpumask_empty(d.nodemask))
- continue;
-
- init_sched_build_groups(d.nodemask, cpu_map,
- &cpu_to_phys_group,
- d.send_covered, d.tmpmask);
- }
+ for (i = 0; i < nr_node_ids; i++)
+ build_sched_groups(&d, SD_LV_CPU, cpu_map, i);

#ifdef CONFIG_NUMA
/* Set up node groups */
--
1.6.4



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/