Prepare for SMP suspend

From: Pavel Machek
Date: Wed Jun 23 2004 - 07:28:50 EST


Hi!

Its very bad idea to freeze migration threads, as it crashes machine
upon next call to "schedule()". In refrigerator, I had one
"wake_up_process()" too many. This fixes it. Please apply,

Signed-off-by: Pavel Machek <pavel@xxxxxxx>

Pavel

--- clean/kernel/sched.c 2004-06-22 12:36:47.000000000 +0200
+++ linux/kernel/sched.c 2004-06-22 12:39:00.000000000 +0200
@@ -3558,6 +3558,7 @@
p = kthread_create(migration_thread, hcpu, "migration/%d",cpu);
if (IS_ERR(p))
return NOTIFY_BAD;
+ p->flags |= PF_NOFREEZE;
kthread_bind(p, cpu);
/* Must be high prio: stop_machine expects to yield to it. */
rq = task_rq_lock(p, &flags);

--- linux.orig/kernel/power/process.c 2004-06-22 12:53:19.000000000 +0200
+++ linux/kernel/power/process.c 2004-06-03 00:27:56.000000000 +0200
@@ -109,7 +109,6 @@
wake_up_process(p);
} else
printk(KERN_INFO " Strange, %s not stopped\n", p->comm );
- wake_up_process(p);
} while_each_thread(g, p);

read_unlock(&tasklist_lock);

--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/