• Oleg Nesterov's avatar
    stop_machine: Kill smp_hotplug_thread->pre_unpark, introduce stop_machine_unpark() · c00166d8
    Oleg Nesterov authored
    1. Change smpboot_unpark_thread() to check ->selfparking, just
       like smpboot_park_thread() does.
    
    2. Introduce stop_machine_unpark() which sets ->enabled and calls
       kthread_unpark().
    
    3. Change smpboot_thread_call() and cpu_stop_init() to call
       stop_machine_unpark() by hand.
    
    This way:
    
        - IMO the ->selfparking logic becomes more consistent.
    
        - We can kill the smp_hotplug_thread->pre_unpark() method.
    
        - We can easily unpark the stopper thread earlier. Say, we
          can move stop_machine_unpark() from smpboot_thread_call()
          to sched_cpu_active() as Peter suggests.
    Signed-off-by: 's avatarOleg Nesterov <oleg@redhat.com>
    Signed-off-by: 's avatarPeter Zijlstra (Intel) <peterz@infradead.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Mike Galbraith <efault@gmx.de>
    Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: heiko.carstens@de.ibm.com
    Link: http://lkml.kernel.org/r/20151009160049.GA10166@redhat.comSigned-off-by: 's avatarIngo Molnar <mingo@kernel.org>
    c00166d8
smpboot.h 2.12 KB