Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756057AbbGPTRK (ORCPT ); Thu, 16 Jul 2015 15:17:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38314 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755998AbbGPTRH (ORCPT ); Thu, 16 Jul 2015 15:17:07 -0400 From: Daniel Bristot de Oliveira To: Tejun Heo , LKML Cc: Lai Jiangshan , Frederic Weisbecker , Rik van Riel , "Luis Claudio R. Goncalves" Subject: [RFC] workqueue: avoiding unbounded wq on isolated CPUs by default Date: Thu, 16 Jul 2015 16:16:23 -0300 Message-Id: <9e53de7c91c885ee255e16ee25f401d9eedf08d9.1437067317.git.bristot@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1205 Lines: 34 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 --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/