From mboxrd@z Thu Jan 1 00:00:00 1970 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 25E03C433F5 for ; Fri, 4 Feb 2022 13:04:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345998AbiBDNEz (ORCPT ); Fri, 4 Feb 2022 08:04:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55516 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344898AbiBDNEv (ORCPT ); Fri, 4 Feb 2022 08:04:51 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1140AC06173D for ; Fri, 4 Feb 2022 05:04:51 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 6FB4861BD6 for ; Fri, 4 Feb 2022 13:04:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2570C340F1; Fri, 4 Feb 2022 13:04:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643979889; bh=rRFnPno5dkJM7f0KqhuvvzKal926llCMJt1u2/5Gzcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T8yH8g6sRGGPbTM/G3nlEt53w9emz5vI4y+y8MlMGGg4vZWS019QhAWGtOWnK8VGX pYk7aeA3edm/xww0lOE5YnBcaATzKbiw8H9mBley8l+ykUHUHuZJmDpF4TU+ebBr/o 1Jp/WL4802xvnXOFqQACY0G2oEtxKQ1nqBJCfsOz915XgPJwAQNLAo/epBAlC6xuDn qUR5KT5oED4yVreX3lk3VJfJHC2xlVaZ880V472ntrhkNrc5nYiqVkH6UQilawgqPK sTIubb/YowEiwzDfsrVWU2ashrRPJ56f/z5OFt5B3e6xFp31DjRzWhD14tXvDq8hMo 34ov8yHFPAsdw== From: Frederic Weisbecker To: Peter Zijlstra Cc: LKML , Frederic Weisbecker , Tejun Heo , Christoph Lameter , Juri Lelli , Alex Belits , Nitesh Lal , Thomas Gleixner , Paul Gortmaker , Nicolas Saenz , "Paul E . McKenney" , Phil Auld , Marcelo Tosatti , Zefan Li Subject: [PATCH 2/8] workqueue: Decouple HK_FLAG_WQ and HK_FLAG_DOMAIN cpumask fetch Date: Fri, 4 Feb 2022 14:04:27 +0100 Message-Id: <20220204130433.488085-3-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220204130433.488085-1-frederic@kernel.org> References: <20220204130433.488085-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. Reviewed-by: Juri Lelli Reviewed-by: Phil Auld Acked-by: Tejun Heo 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 Cc: Paul Gortmaker Cc: Paul E. McKenney --- kernel/workqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index 33f1106b4f99..61ed310621ea 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -6006,13 +6006,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