Skip to content
  • Thomas Gleixner's avatar
    smpboot: Provide infrastructure for percpu hotplug threads · f97f8f06
    Thomas Gleixner authored
    
    
    Provide a generic interface for setting up and tearing down percpu
    threads.
    
    On registration the threads for already online cpus are created and
    started. On deregistration (modules) the threads are stoppped.
    
    During hotplug operations the threads are created, started, parked and
    unparked. The datastructure for registration provides a pointer to
    percpu storage space and optional setup, cleanup, park, unpark
    functions. These functions are called when the thread state changes.
    
    Each implementation has to provide a function which is queried and
    returns whether the thread should run and the thread function itself.
    
    The core code handles all state transitions and avoids duplicated code
    in the call sites.
    
    [ paulmck: Preemption leak fix ]
    
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Reviewed-by: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    Reviewed-by: Paul...
    f97f8f06