diff options
author | Nathan Lynch <ntl@pobox.com> | 2007-01-11 02:15:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2007-01-11 21:18:20 -0500 |
commit | e5e5673f828623e58a401862b33173591faaeaff (patch) | |
tree | 51af4f3295f5104217e90d75af6df881b851b3be | |
parent | c71551ad309c46d9d2433a9b688491edbd10c806 (diff) |
[PATCH] sched: tasks cannot run on cpus onlined after boot
Commit 5c1e176781f43bc902a51e5832f789756bff911b ("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.html
Signed-off-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | kernel/sched.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 3df33da0dafc..cca93cc0dd7d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6865,7 +6865,7 @@ void __init sched_init_smp(void) | |||
6865 | 6865 | ||
6866 | lock_cpu_hotplug(); | 6866 | lock_cpu_hotplug(); |
6867 | arch_init_sched_domains(&cpu_online_map); | 6867 | arch_init_sched_domains(&cpu_online_map); |
6868 | cpus_andnot(non_isolated_cpus, cpu_online_map, cpu_isolated_map); | 6868 | cpus_andnot(non_isolated_cpus, cpu_possible_map, cpu_isolated_map); |
6869 | if (cpus_empty(non_isolated_cpus)) | 6869 | if (cpus_empty(non_isolated_cpus)) |
6870 | cpu_set(smp_processor_id(), non_isolated_cpus); | 6870 | cpu_set(smp_processor_id(), non_isolated_cpus); |
6871 | unlock_cpu_hotplug(); | 6871 | unlock_cpu_hotplug(); |