From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753704AbdJSVoc (ORCPT ); Thu, 19 Oct 2017 17:44:32 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:45437 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752536AbdJSVoa (ORCPT ); Thu, 19 Oct 2017 17:44:30 -0400 X-Google-Smtp-Source: ABhQp+QuOJCAugbW/yoffPg2rqNSzmP+236TLVCCzOD0ltE3ihsUpPjH9QxJMsR+wehOGyhpTvv4NA== From: Tal Shorer To: tj@kernel.org, jiangshanlai@gmail.com, linux-kernel@vger.kernel.org Cc: Tal Shorer Subject: [PATCH] workqueue: respect isolated cpus when queueing an unbound work Date: Fri, 20 Oct 2017 00:44:06 +0300 Message-Id: <1508449446-23693-1-git-send-email-tal.shorer@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Initialize wq_unbound_cpumask to exclude cpus that were isolated by the cmdline's isolcpus parameter. Signed-off-by: Tal Shorer --- kernel/workqueue.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ca937b0..25b351d 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -5546,7 +5546,7 @@ int __init workqueue_init_early(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); + cpumask_andnot(wq_unbound_cpumask, cpu_possible_mask, cpu_isolated_map); pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC); -- 2.7.4