• Tejun Heo's avatar
    workqueue: kill cpu_populated_map · 1537663f
    Tejun Heo authored
    Worker management is about to be overhauled.  Simplify things by
    removing cpu_populated_map, creating workers for all possible cpus and
    making single threaded workqueues behave more like multi threaded
    ones.
    
    After this patch, all cwqs are always initialized, all workqueues are
    linked on the workqueues list and workers for all possibles cpus
    always exist.  This also makes CPU hotplug support simpler - checking
    ->cpus_allowed before processing works in worker_thread() and flushing
    cwqs on CPU_POST_DEAD are enough.
    
    While at it, make get_cwq() always return the cwq for the specified
    cpu, add target_cwq() for cases where single thread distinction is
    necessary and drop all direct usage of per_cpu_ptr() on wq->cpu_wq.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    1537663f
workqueue.c 29.4 KB