Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756520AbbGVMnu (ORCPT ); Wed, 22 Jul 2015 08:43:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58714 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756401AbbGVMns (ORCPT ); Wed, 22 Jul 2015 08:43:48 -0400 Message-ID: <55AF8FFF.1050407@redhat.com> Date: Wed, 22 Jul 2015 09:43:43 -0300 From: Daniel Bristot de Oliveira User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Tejun Heo , Lai Jiangshan CC: Mike Galbraith , Frederic Weisbecker , LKML , Rik van Riel , "Luis Claudio R. Goncalves" Subject: [PATCH] workqueue: avoiding unbounded wq on isolated CPUs by default References: <9e53de7c91c885ee255e16ee25f401d9eedf08d9.1437067317.git.bristot@redhat.com> <20150716192448.GY15934@mtj.duckdns.org> <1437107190.3438.23.camel@gmail.com> <20150717152720.GD15934@mtj.duckdns.org> <1437153348.5860.32.camel@gmail.com> <20150718133602.GA3041@lerouge> <1437292973.3505.83.camel@gmail.com> <1437468925.12755.57.camel@gmail.com> <1437542686.3106.55.camel@gmail.com> In-Reply-To: <1437542686.3106.55.camel@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1200 Lines: 32 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/