Commit 97b6dbb2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Prepare for SMP suspend

From: Pavel Machek <pavel@ucw.cz>

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.
Signed-off-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f9e382ec
......@@ -109,7 +109,6 @@ void thaw_processes(void)
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);
......
......@@ -3571,6 +3571,7 @@ static int migration_call(struct notifier_block *nfb, unsigned long action,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment