* [PATCH] sched: Fix incorrect sanity check
@ 2010-01-21 15:34 Peter Zijlstra
0 siblings, 0 replies; only message in thread
From: Peter Zijlstra @ 2010-01-21 15:34 UTC (permalink / raw)
To: Ingo Molnar; +Cc: heiko.carstens, Gautham R Shenoy, lkml
We moved to migrate on wakeup, which means that sleeping tasks could
still be present on offline cpus. Amend the check to only test running
tasks.
Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6/kernel/cpu.c
===================================================================
--- linux-2.6.orig/kernel/cpu.c
+++ linux-2.6/kernel/cpu.c
@@ -151,7 +151,7 @@ static inline void check_for_tasks(int c
write_lock_irq(&tasklist_lock);
for_each_process(p) {
- if (task_cpu(p) == cpu &&
+ if (task_cpu(p) == cpu && p->state == TASK_RUNNING &&
(!cputime_eq(p->utime, cputime_zero) ||
!cputime_eq(p->stime, cputime_zero)))
printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d\
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-21 15:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-21 15:34 [PATCH] sched: Fix incorrect sanity check Peter Zijlstra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®