• Tejun Heo's avatar
    workqueue: make GCWQ_FREEZING a pool flag · 35b6bb63
    Tejun Heo authored
    Make GCWQ_FREEZING a pool flag POOL_FREEZING.  This patch doesn't
    change locking - FREEZING on both pools of a CPU are set or clear
    together while holding gcwq->lock.  It shouldn't cause any functional
    difference.
    
    This leaves gcwq->flags w/o any flags.  Removed.
    
    While at it, convert BUG_ON()s in freeze_workqueue_begin() and
    thaw_workqueues() to WARN_ON_ONCE().
    
    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>
    35b6bb63
workqueue.c 106 KB