Bug in init_sched_build_groups?
Hi Nick,
I stumbled over a problem in the sched_domain code in regard to zSeries (s390). The problem seems to have been introduced by ChangeSet 1.1837.3.11: [PATCH] sched: consolidate sched domains. With z/VM it is possible to start with a small set of cpus and later on add more if you need them. If I try to online one of the "late" cpus the scheduler crashes in find_busiest group because the sched_group for the late cpu is not in the linked list of sched_groups (group->next is NULL at sched.c:4770). I worked around that problem with the attached patch. Dunno if this is the right way to do it but it works for me.
blue skies,
Martin.
diffstat:
kernel/sched.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-)
kernel/sched.c +1 -1
@@ -4358,7 +4358,7 @@cpumask_t covered =CPU_MASK_NONE ;int i; -for_each_cpu_mask (i, span) { +for_each_cpu_mask (i, cpu_possible_map) {int group =group_fn (i);struct sched_group *sg = &groups[group];int j;