All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] workqueue: avoiding unbounded wq on isolated CPUs by default
@ 2015-07-16 19:16 Daniel Bristot de Oliveira
  2015-07-16 19:24 ` Tejun Heo
  0 siblings, 1 reply; 19+ messages in thread
From: Daniel Bristot de Oliveira @ 2015-07-16 19:16 UTC (permalink / raw)
  To: Tejun Heo, LKML
  Cc: Lai Jiangshan, Frederic Weisbecker, Rik van Riel,
	Luis Claudio R. Goncalves

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


^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2015-07-24  3:39 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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                 ` [PATCH] workqueue: avoiding unbounded wq on isolated CPUs by default Daniel Bristot de Oliveira
2015-07-22 14:11                 ` [patch] workqueue: schedule WORK_CPU_UNBOUND work on wq_unbound_cpumask CPUs 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

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.