Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753432AbdHWBwl (ORCPT ); Tue, 22 Aug 2017 21:52:41 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:34579 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753225AbdHWBvd (ORCPT ); Tue, 22 Aug 2017 21:51:33 -0400 From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Peter Zijlstra , Chris Metcalf , Thomas Gleixner , Luiz Capitulino , Christoph Lameter , "Paul E . McKenney" , Ingo Molnar , Mike Galbraith , Rik van Riel , Wanpeng Li Subject: [RFC PATCH 09/12] workqueue: Affine unbound workqueues to housekeeping cpumask Date: Wed, 23 Aug 2017 03:51:08 +0200 Message-Id: <1503453071-952-10-git-send-email-fweisbec@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503453071-952-1-git-send-email-fweisbec@gmail.com> References: <1503453071-952-1-git-send-email-fweisbec@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1820 Lines: 55 Although the unbound workqueue cpumask can be overriden through sysfs, we also want to affine the workqueues when isolcpus= will be reimplemented on top of housekeeping. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Rik van Riel Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Mike Galbraith Cc: Ingo Molnar Cc: Christoph Lameter Cc: Paul E. McKenney Cc: Wanpeng Li Cc: Luiz Capitulino --- include/linux/housekeeping.h | 1 + kernel/workqueue.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/linux/housekeeping.h b/include/linux/housekeeping.h index b1a62544..0959601 100644 --- a/include/linux/housekeeping.h +++ b/include/linux/housekeeping.h @@ -10,6 +10,7 @@ enum hk_flags { HK_FLAG_RCU = (1 << 1), HK_FLAG_MISC = (1 << 2), HK_FLAG_SCHED = (1 << 3), + HK_FLAG_WORKQUEUE = (1 << 4), }; #ifdef CONFIG_CPU_ISOLATION diff --git a/kernel/workqueue.c b/kernel/workqueue.c index ca937b0..256e3cb 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -48,6 +48,7 @@ #include #include #include +#include #include "workqueue_internal.h" @@ -5546,7 +5547,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_copy(wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_WORKQUEUE)); pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC); -- 2.7.4