提交 330dad5b 编写于 作者: J Joonsoo Kim 提交者: Tejun Heo

workqueue: use enum value to set array size of pools in gcwq

Commit 3270476a ('workqueue: reimplement
WQ_HIGHPRI using a separate worker_pool') introduce separate worker_pool
for HIGHPRI. Although there is NR_WORKER_POOLS enum value which represent
size of pools, definition of worker_pool in gcwq doesn't use it.
Using it makes code robust and prevent future mistakes.
So change code to use this enum value.
Signed-off-by: NJoonsoo Kim <js1304@gmail.com>
Signed-off-by: NTejun Heo <tj@kernel.org>
上级 23657bb1
......@@ -183,7 +183,8 @@ struct global_cwq {
struct hlist_head busy_hash[BUSY_WORKER_HASH_SIZE];
/* L: hash of busy workers */
struct worker_pool pools[2]; /* normal and highpri pools */
struct worker_pool pools[NR_WORKER_POOLS];
/* normal and highpri pools */
wait_queue_head_t rebind_hold; /* rebind hold wait */
} ____cacheline_aligned_in_smp;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册