• Lai Jiangshan's avatar
    workqueue: kick a worker in pwq_adjust_max_active() · 951a078a
    Lai Jiangshan authored
    If pwq_adjust_max_active() changes max_active from 0 to
    saved_max_active, it needs to wakeup worker.  This is already done by
    thaw_workqueues().
    
    If pwq_adjust_max_active() increases max_active for an unbound wq,
    while not strictly necessary for correctness, it's still desirable to
    wake up a worker so that the requested concurrency level is reached
    sooner.
    
    Move wake_up_worker() call from thaw_workqueues() to
    pwq_adjust_max_active() so that it can handle both of the above two
    cases.  This also makes thaw_workqueues() simpler.
    
    tj: Updated comments and description.
    Signed-off-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    951a078a
workqueue.c 123 KB