diff options
| author | Nathan T. Lynch <ntl@pobox.com> | 2005-03-07 17:59:09 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-03-07 17:59:09 -0800 |
| commit | 1e0b6385639c96fc3f5496ea691f99feab664e29 (patch) | |
| tree | 8407f62789e11a62d9584c83f62636800ee2d0a7 /kernel | |
| parent | 909c31786f4d169e692a1bc473c89b19da36ec4f (diff) | |
[PATCH] explicitly bind idle tasks
With hotplug cpu and preempt, we tend to see smp_processor_id warnings from
idle loop code because it's always checking whether its cpu has gone
offline. Replacing every use of smp_processor_id with _smp_processor_id in
all idle loop code is one solution; another way is explicitly binding idle
threads to their cpus (the smp_processor_id warning does not fire if the
caller is bound only to the calling cpu). This has the (admittedly slight)
advantage of letting us know if an idle thread ever runs on the wrong cpu.
Signed-off-by: Nathan Lynch <ntl@pobox.com>
Acked-by: Joel Schopp <jschopp@austin.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index f32101f5e31a..0888acbe3f66 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -4063,6 +4063,7 @@ void __devinit init_idle(task_t *idle, int cpu) idle->array = NULL; idle->prio = MAX_PRIO; idle->state = TASK_RUNNING; + idle->cpus_allowed = cpumask_of_cpu(cpu); set_task_cpu(idle, cpu); spin_lock_irqsave(&rq->lock, flags); |
