]> git.baikalelectronics.ru Git - kernel.git/commit
workqueue: replace for_each_pwq_cpu() with for_each_pwq()
authorTejun Heo <tj@kernel.org>
Tue, 12 Mar 2013 18:29:58 +0000 (11:29 -0700)
committerTejun Heo <tj@kernel.org>
Tue, 12 Mar 2013 18:29:58 +0000 (11:29 -0700)
commit7cdb3da96d1ce2fddab1ff74a0750454262f47ba
tree6abded05fad30819d5f417cd967ffe468d25b629
parent6706e9871b514e2cb28a335d3904436bf4453eb6
workqueue: replace for_each_pwq_cpu() with for_each_pwq()

Introduce for_each_pwq() which iterates all pool_workqueues of a
workqueue using the recently added workqueue->pwqs list and replace
for_each_pwq_cpu() usages with it.

This is primarily to remove the single unbound CPU assumption from pwq
iteration for the scheduled unbound pools with custom attributes
support which would introduce multiple unbound pwqs per workqueue;
however, it also simplifies iterator users.

Note that pwq->pool initialization is moved to alloc_and_link_pwqs()
as that now is the only place which is explicitly handling the two pwq
types.

This patch doesn't introduce any visible behavior changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Lai Jiangshan <laijs@cn.fujitsu.com>
kernel/workqueue.c