提交 e5e5673f 编写于 作者: N Nathan Lynch 提交者: Linus Torvalds

[PATCH] sched: tasks cannot run on cpus onlined after boot

Commit 5c1e1767 ("sched: force /sbin/init
off isolated cpus") sets init's cpus_allowed to a subset of cpu_online_map
at boot time, which means that tasks won't be scheduled on cpus that are
added to the system later.

Make init's cpus_allowed a subset of cpu_possible_map instead.  This should
still preserve the behavior that Nick's change intended.

Thanks to Giuliano Pochini for reporting this and testing the fix:

http://ozlabs.org/pipermail/linuxppc-dev/2006-December/029397.htmlSigned-off-by: NNathan Lynch <ntl@pobox.com>
Acked-by: NIngo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 c71551ad
...@@ -6865,7 +6865,7 @@ void __init sched_init_smp(void) ...@@ -6865,7 +6865,7 @@ void __init sched_init_smp(void)
lock_cpu_hotplug(); lock_cpu_hotplug();
arch_init_sched_domains(&cpu_online_map); arch_init_sched_domains(&cpu_online_map);
cpus_andnot(non_isolated_cpus, cpu_online_map, cpu_isolated_map); cpus_andnot(non_isolated_cpus, cpu_possible_map, cpu_isolated_map);
if (cpus_empty(non_isolated_cpus)) if (cpus_empty(non_isolated_cpus))
cpu_set(smp_processor_id(), non_isolated_cpus); cpu_set(smp_processor_id(), non_isolated_cpus);
unlock_cpu_hotplug(); unlock_cpu_hotplug();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册