提交 11854247 编写于 作者: P Peter Zijlstra 提交者: Ingo Molnar

sched: Fix incorrect sanity check

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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 fabf318e
...@@ -151,7 +151,7 @@ static inline void check_for_tasks(int cpu) ...@@ -151,7 +151,7 @@ static inline void check_for_tasks(int cpu)
write_lock_irq(&tasklist_lock); write_lock_irq(&tasklist_lock);
for_each_process(p) { 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->utime, cputime_zero) ||
!cputime_eq(p->stime, cputime_zero))) !cputime_eq(p->stime, cputime_zero)))
printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d\ printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d\
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册