Skip to content
  • Tejun Heo's avatar
    workqueue: remove CPU offline trustee · 628c78e7
    Tejun Heo authored
    
    
    With the previous changes, a disassociated global_cwq now can run as
    an unbound one on its own - it can create workers as necessary to
    drain remaining works after the CPU has been brought down and manage
    the number of workers using the usual idle timer mechanism making
    trustee completely redundant except for the actual unbinding
    operation.
    
    This patch removes the trustee and let a disassociated global_cwq
    manage itself.  Unbinding is moved to a work item (for CPU affinity)
    which is scheduled and flushed from CPU_DONW_PREPARE.
    
    This patch moves nr_running clearing outside gcwq and manager locks to
    simplify the code.  As nr_running is unused at the point, this is
    safe.
    
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Acked-by: default avatar"Rafael J. Wysocki" <rjw@sisk.pl>
    628c78e7