• Waiman Long's avatar
    workqueue: Enable unbound cpumask update on ordered workqueues · 4c065dbc
    Waiman Long authored
    Ordered workqueues does not currently follow changes made to the
    global unbound cpumask because per-pool workqueue changes may break
    the ordering guarantee. IOW, a work function in an ordered workqueue
    may run on an isolated CPU.
    
    This patch enables ordered workqueues to follow changes made to the
    global unbound cpumask by temporaily plug or suspend the newly allocated
    pool_workqueue from executing newly queued work items until the old
    pwq has been properly drained. For ordered workqueues, there should
    only be one pwq that is unplugged, the rests should be plugged.
    
    This enables ordered workqueues to follow the unbound cpumask changes
    like other unbound workqueues at the expense of some delay in execution
    of work functions during the transition period.
    Signed-off-by: default avatarWaiman Long <longman@redhat.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    4c065dbc
workqueue.c 214 KB