From: Libin <huawei.libin@huawei.com>
To: <tj@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <wangyijing@huawei.com>,
<guohanjun@huawei.com>
Subject: [PATCH] workqueue: remove meaningless BUILD_BUG_ON() in init_workqueues()
Date: Mon, 9 Sep 2013 13:10:00 +0800 [thread overview]
Message-ID: <1378703400-4536-1-git-send-email-huawei.libin@huawei.com> (raw)
From: Li Bin <huawei.libin@huawei.com>
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@huawei.com>
---
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
next reply other threads:[~2013-09-09 5:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 5:10 Libin [this message]
2013-09-09 14:13 ` Tejun Heo
2013-09-09 14:18 ` Tejun Heo
2013-09-10 0:26 ` Libin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378703400-4536-1-git-send-email-huawei.libin@huawei.com \
--to=huawei.libin@huawei.com \
--cc=guohanjun@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
--cc=wangyijing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®