lkml.org 
[lkml]   [2007]   [Apr]   [19]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateThu, 19 Apr 2007 08:28:32 +0200
FromIngo Molnar <>
SubjectRe: CFS and suspend2: hang in atomic copy
* Christian Hesse <mail@earthworm.de> wrote:

> I now got some error message from my system:
> 
> http://www.eworm.de/tmp/cfs-suspend.jpg

ah, this pinpoints a bug: for performance reasons pick_next_task() 
assumes that the runqueue is not empty - which is true for schedule(), 
but not in migrate_dead_tasks(). Does the patch below fix the crash for 
you?

	Ingo

---
 kernel/sched.c |    2 ++
 1 file changed, 2 insertions(+)
Index: linux/kernel/sched.c
===================================================================
--- linux.orig/kernel/sched.c
+++ linux/kernel/sched.c
@@ -4425,6 +4425,8 @@ static void migrate_dead_tasks(unsigned 
 	struct task_struct *next;
 
 	for (;;) {
+		if (!rq->nr_running)
+			break;
 		next = pick_next_task(rq, rq->curr);
 		if (!next)
 			break;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-04-19 08:31    [from the cache]
©2003-2008