Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C708DC433F5 for ; Tue, 4 Jan 2022 14:50:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234420AbiADOuH (ORCPT ); Tue, 4 Jan 2022 09:50:07 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:35086 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234396AbiADOuA (ORCPT ); Tue, 4 Jan 2022 09:50:00 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6F307B81125 for ; Tue, 4 Jan 2022 14:49:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FD80C36AF3; Tue, 4 Jan 2022 14:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1641307798; bh=WrWKpVgJLQAdQeNhZs1tCFJTul6BO40+uMOAm3lLUB4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cNNurJN/fidbldLKUBiTyVYObezMR2edKh58mg4Zz4I0cVqVPbebvnMnNI5YQc3Lo 87Gg9SqQ4zdsrs0k87YvIj0IhC/YK6kBSm+mA/epzMcPtAX2IIVwffA1W0AL2HMXPQ iTcZYEC2LXZcY4ZmgJedi+sdpk+FzKPT5wrLXUq+uX0NX3R9DHiCFRhdYPnk0fehNq SuCjgkKv7qQLJhj2/oV4RZyi6xnmcCRfFgqGiGOWnBLhBnWYpUxUNY60c8DoErl+h0 WvbTQCNoy/LfZ4cePzlhnQnYvKL1z2D0wFBcf5zQlHwtkSIQ9A0rih/eNfsoOpRW6x yM2AOTij/dpFw== From: Frederic Weisbecker To: Peter Zijlstra Cc: LKML , Frederic Weisbecker , Tejun Heo , Juri Lelli , Alex Belits , Nitesh Lal , Thomas Gleixner , Nicolas Saenz , Christoph Lameter , Marcelo Tosatti , Zefan Li , Paul Gortmaker , "Paul E . McKenney" Subject: [PATCH 2/8] workqueue: Decouple HK_FLAG_WQ and HK_FLAG_DOMAIN cpumask fetch Date: Tue, 4 Jan 2022 15:49:38 +0100 Message-Id: <20220104144944.1278663-3-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220104144944.1278663-1-frederic@kernel.org> References: <20220104144944.1278663-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To prepare for supporting each feature of the housekeeping cpumask toward cpuset, prepare each of the HK_FLAG_* entries to move to their own cpumask with enforcing to fetch them individually. The new constraint is that multiple HK_FLAG_* entries can't be mixed together anymore in a single call to housekeeping cpumask(). This will later allow, for example, to runtime modify the cpulist passed through "isolcpus=", "nohz_full=" and "rcu_nocbs=" kernel boot parameters. Signed-off-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: Juri Lelli Cc: Marcelo Tosatti Cc: Nitesh Lal Cc: Nicolas Saenz Cc: Peter Zijlstra Cc: Christoph Lameter Cc: Tejun Heo Cc: Zefan Li Cc: Alex Belits --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 613917bbc4e7..dbd9ad4873fc 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -6017,13 +6017,13 @@ static void __init wq_numa_init(void) void __init workqueue_init_early(void) { int std_nice[NR_STD_WORKER_POOLS] = { 0, HIGHPRI_NICE_LEVEL }; - int hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ; int i, cpu; BUILD_BUG_ON(__alignof__(struct pool_workqueue) < __alignof__(long long)); BUG_ON(!alloc_cpumask_var(&wq_unbound_cpumask, GFP_KERNEL)); - cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(hk_flags)); + cpumask_copy(wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_WQ)); + cpumask_and(wq_unbound_cpumask, wq_unbound_cpumask, housekeeping_cpumask(HK_FLAG_DOMAIN)); pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC); -- 2.25.1