workqueue: Simplify pool_allowed_cpus()
Lai Jiangshan
reviewerPATCH 1/1 workqueue: Simplify pool_allowed_cpus()
From: Lai Jiangshan <[email protected]>
For cpu worker pools, attrs->affn_strict is true; attrs->__pod_cpumask and attrs->cpumask are the same. Skip the pool->cpu test in pool_allowed_cpus() and use pool->attrs->__pod_cpumask.
Signed-off-by Lai Jiangshan <[email protected]>
--- kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/workqueue.c +1 -1
@@ -2646,7 +2646,7 @@ static struct worker *alloc_worker(int node)static cpumask_t *pool_allowed_cpus (struct worker_pool *pool) { -if (pool->cpu <0 && pool->attrs->affn_strict) +if (pool->attrs->affn_strict)return pool->attrs->__pod_cpumask;else return pool->attrs->cpumask;
Signature · 1 line
2.19.1.6.gb485710b
Quoted 7 lines · Lai Jiangshan
From: Lai Jiangshan <[email protected]>
For cpu worker pools,
attrs->affn_strictis true;attrs->__pod_cpumaskandattrs->cpumaskare the same. Skip thepool->cputest inpool_allowed_cpus()and usepool->attrs->__pod_cpumask.Signed-off-by Lai Jiangshan <[email protected]>
Applied to wq/for-6.11.
Thanks.
Signature · 1 line
tejun