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 26508C4707E for ; Mon, 7 Feb 2022 16:02:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386817AbiBGQB1 (ORCPT ); Mon, 7 Feb 2022 11:01:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245674AbiBGP7a (ORCPT ); Mon, 7 Feb 2022 10:59:30 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C594C0401CC for ; Mon, 7 Feb 2022 07:59:29 -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 sin.source.kernel.org (Postfix) with ESMTPS id ED51CCE117B for ; Mon, 7 Feb 2022 15:59:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 44E62C340F1; Mon, 7 Feb 2022 15:59:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644249566; bh=rRFnPno5dkJM7f0KqhuvvzKal926llCMJt1u2/5Gzcs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ht2+US44QjkwBGabQKfd+HQsGzSiDtUE6aGAel5GK5j2jPY0dxdnU+771HrqJWyp3 yMSgogoceiO+vkImpf+gAIqt+Kb1toFH+jVnfSySGJzsBluqyGZB0tVLEOo92gPezi gEIF5itU/nfiYXnV1KfQIGPKbyyxJOKu9i4jd8nNjPtj1CfTA+57y1lvXSsR8PceER Q/r6u1kk/hblG9lo5GgTVZfXWlxWfZaedhFcdrMSmc0UW9mp77z6RihgUY88WRxKkA U1EYqZvd3eCfMuUr9TcnnkaxU5zk0WYSY9zTxZ8YaTgEd7+f6j+nFMVucCNYk2aqxv S3PRkDqHeLjXA== 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: Mon, 7 Feb 2022 16:59:04 +0100 Message-Id: <20220207155910.527133-3-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220207155910.527133-1-frederic@kernel.org> References: <20220207155910.527133-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