• Tejun Heo's avatar
    workqueue: move busy_hash from global_cwq to worker_pool · c9e7cf27
    Tejun Heo authored
    There's no functional necessity for the two pools on the same CPU to
    share the busy hash table.  It's also likely to be a bottleneck when
    implementing pools with user-specified attributes.
    
    This patch makes busy_hash per-pool.  The conversion is mostly
    straight-forward.  Changes worth noting are,
    
    * Large block of changes in rebind_workers() is moving the block
      inside for_each_worker_pool() as now there are separate hash tables
      for each pool.  This changes the order of operations but doesn't
      break anything.
    
    * Thre for_each_worker_pool() loops in gcwq_unbind_fn() are combined
      into one.  This again changes the order of operaitons but doesn't
      break anything.
    
    This is part of an effort to remove global_cwq and make worker_pool
    the top level abstraction, which in turn will help implementing worker
    pools with user-specified attributes.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Reviewed-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
    c9e7cf27
workqueue.c 107 KB