From: Daniel Bristot de Oliveira <bristot@redhat.com>
To: Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Rik van Riel <riel@redhat.com>,
"Luis Claudio R. Goncalves" <lclaudio@uudg.org>
Subject: [PATCH] workqueue: avoiding unbounded wq on isolated CPUs by default
Date: Wed, 22 Jul 2015 09:43:43 -0300 [thread overview]
Message-ID: <55AF8FFF.1050407@redhat.com> (raw)
In-Reply-To: <1437542686.3106.55.camel@gmail.com>
By default, unbounded workqueues run on all CPUs, which includes
isolated CPUs. This patch avoids unbounded workqueues running on
isolated CPUs by default, keeping the current behavior when no
CPUs were isolated.
Signed-off-by: Daniel Bristot de Oliveira <bristot@redhat.com>
---
kernel/workqueue.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4c4f061..14d17f4 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5217,7 +5217,10 @@ static int __init init_workqueues(void)
WARN_ON(__alignof__(struct pool_workqueue) < __alignof__(long long));
BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL));
- cpumask_copy(wq_unbound_cpumask, cpu_possible_mask);
+
+ /* by default, run unbound wq on non-isolated CPUs */
+ cpumask_andnot(wq_unbound_cpumask, cpu_possible_mask,
+ cpu_isolated_map);
pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC);
-- 2.1.0
next prev parent reply other threads:[~2015-07-22 12:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-16 19:16 [RFC] workqueue: avoiding unbounded wq on isolated CPUs by default Daniel Bristot de Oliveira
2015-07-16 19:24 ` Tejun Heo
2015-07-17 4:26 ` Mike Galbraith
2015-07-17 15:27 ` Tejun Heo
2015-07-17 15:35 ` Frederic Weisbecker
2015-07-17 15:43 ` Tejun Heo
2015-07-17 17:15 ` Mike Galbraith
2015-07-18 13:36 ` Frederic Weisbecker
2015-07-18 15:48 ` Mike Galbraith
2015-07-19 8:02 ` Mike Galbraith
2015-07-19 12:19 ` Mike Galbraith
2015-07-21 8:55 ` Mike Galbraith
2015-07-22 5:24 ` [patch] workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs Mike Galbraith
2015-07-22 12:43 ` Daniel Bristot de Oliveira [this message]
2015-07-22 14:11 ` Tejun Heo
2015-07-22 14:55 ` Mike Galbraith
2015-07-22 15:19 ` Mike Galbraith
2015-07-22 15:25 ` Tejun Heo
2015-07-24 3:38 ` Mike Galbraith
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=55AF8FFF.1050407@redhat.com \
--to=bristot@redhat.com \
--cc=fweisbec@gmail.com \
--cc=jiangshanlai@gmail.com \
--cc=lclaudio@uudg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@redhat.com \
--cc=tj@kernel.org \
--cc=umgwanakikbuti@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.