[PATCH] workqueue: remove meaningless BUILD_BUG_ON() in init_workqueues()

From: Libin
Date: Mon Sep 09 2013 - 01:10:24 EST


From: Li Bin <huawei.libin@xxxxxxxxxx>

In the current implementation, this BUILD_BUG_ON makes no sense.
First of all, the number of worker pools needed cannot be determined
at compile time, because the number of backing pools for UNBOUND
workqueues is dynamic based on the assigned custom attributes.
Secondly, it should use WORK_OFFQ_POOL_BITS instead of
(BITS_PER_LONG - WORK_OFFQ_POOL_SHIFT).

Signed-off-by: Li Bin <huawei.libin@xxxxxxxxxx>
---
kernel/workqueue.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 987293d..41019b1 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5009,10 +5009,6 @@ static int __init init_workqueues(void)
int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL };
int i, cpu;

- /* make sure we have enough bits for OFFQ pool ID */
- BUILD_BUG_ON((1LU << (BITS_PER_LONG - WORK_OFFQ_POOL_SHIFT)) <
- WORK_CPU_END * NR_STD_WORKER_POOLS);
-
WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));

pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC);
--
1.8.2.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/