kthread: Implement park/unpark facility

To avoid the full teardown/setup of per cpu kthreads in the case of
cpu hot(un)plug, provide a facility which allows to put the kthread
into a park position and unpark it when the cpu comes online again.

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Reviewed-by: Srivatsa S. Bhat <[email protected]>
Cc: Rusty Russell <[email protected]>
Reviewed-by: Paul E. McKenney <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
2 files changed