• B
    workqueue: implement NUMA affinity for single thread workqueue · df86cc94
    Biaoxiang Ye 提交于
    euleros inclusion
    category: feature
    feature: Implement NUMA affinity for order workqueue
    
    -------------------------------------------------
    
    Currently, single thread workqueue only have single pwq, all of
    works are queued the same workerpool. This is not optimal on
    NUMA machines, will cause workers jump around across node.
    
    This patch add a new wq flags __WQ_DYNAMIC,  this new kind of
    single thread workqueue creates a separate pwq covering the
    intersecting CPUS for each NUMA node which has online CPUS
    in @attrs->cpumask instead of mapping all entries of numa_pwq_tbl[]
    to the same pwq. After this, we can specify the @cpu of
    queue_work_on, so the work can be executed on the same NUMA
    node of the specified @cpu.
    This kind of wq only support single work, multi works can't guarantee
    the work's order.
    Signed-off-by: NBiaoxiang Ye <yebiaoxiang@huawei.com>
    Acked-by: NHanjun Guo <guohanjun@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    df86cc94
workqueue.c 163.2 KB