• Lai Jiangshan's avatar
    workqueue: use generic attach/detach routine for rescuers · 51697d39
    Lai Jiangshan authored
    There are several problems with the code that rescuers use to bind
    themselve to the target pool's cpumask.
    
      1) It is very different from how the normal workers bind to cpumask,
         increasing code complexity and maintenance overhead.
    
      2) The code of cpu-binding for rescuers is complicated.
    
      3) If one or more cpu hotplugs happen while a rescuer is processing
         its scheduled work items, the rescuer may not stay bound to the
         cpumask of the pool. This is an allowed behavior, but is still
         hairy. It will be better if the cpumask of the rescuer is always
         kept synchronized with the pool across cpu hotplugs.
    
    Using generic attach/detach routine will solve the above problems and
    results in much simpler code.
    
    tj: Minor description updates.
    Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    51697d39
workqueue.c 138 KB