From: Oleg Nesterov Date: Wed, 17 Jun 2009 23:27:45 +0000 (-0700) Subject: kthreads: simplify migration_thread() exit path X-Git-Tag: v2.6.31-rc1~202 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=371cbb387e33651b4c1326457116568ff01ac422;p=pandora-kernel.git kthreads: simplify migration_thread() exit path Now that kthread_stop() can be used even if the task has already exited, we can kill the "wait_to_die:" loop in migration_thread(). But we must pin rq->migration_thread after creation. Actually, I don't think CPU_UP_CANCELED or CPU_DEAD should wait for ->migration_thread exit. Perhaps we can simplify this code a bit more. migration_call() can set ->should_stop and forget about this thread. But we need a new helper in kthred.c for that. Signed-off-by: Oleg Nesterov Cc: Christoph Hellwig Cc: "Eric W. Biederman" Cc: Ingo Molnar Cc: Pavel Emelyanov Cc: Rusty Russell Cc: Vitaliy Gusev Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed