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 3714AC433EF for ; Fri, 4 Feb 2022 13:05:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347545AbiBDNFH (ORCPT ); Fri, 4 Feb 2022 08:05:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244168AbiBDNE4 (ORCPT ); Fri, 4 Feb 2022 08:04:56 -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 5841DC06173D for ; Fri, 4 Feb 2022 05:04:56 -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 CDB36CE223A for ; Fri, 4 Feb 2022 13:04:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 549D5C340E9; Fri, 4 Feb 2022 13:04:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643979893; bh=roMSEXVnB5ySGkuuG1Fwml7ufF9ojMdhUUb6lYN0gfg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lErtWkU7KMs353928ImNR0/+JPuIjlfRnkooMJrn3B27b/1CaAm+8Q74rxCl0I3Z9 BpbGwix7v8K48WZ18XSn3DDJC45toW62tet4yjwVUNsbLq0nLa1KyvCSPPYB3CpT/9 /9ea/Tm0l2GlB4pnkJ9CCzKvJC2V8M1s1dylsEICGcQApowqnvbNV8N4pGI6Ao8zvM iNG+6UJulIYtqpZoor9hqll9i4OdDAtj1F+j8BEM31NGBLluDXn1vzIacQyZ8Tdgum cHkme4Y/0u2oOrr7PtxCpw+UsV22fiW0AKJoeJL1vLgMj6xwA7aUsedaj9gGG/USdW 0aVxIGiBBfH9A== 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 3/8] net: Decouple HK_FLAG_WQ and HK_FLAG_DOMAIN cpumask fetch Date: Fri, 4 Feb 2022 14:04:28 +0100 Message-Id: <20220204130433.488085-4-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 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 --- net/core/net-sysfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 53ea262ecafd..ed8da7b8d35b 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -823,7 +823,7 @@ static ssize_t store_rps_map(struct netdev_rx_queue *queue, { struct rps_map *old_map, *map; cpumask_var_t mask; - int err, cpu, i, hk_flags; + int err, cpu, i; static DEFINE_MUTEX(rps_map_mutex); if (!capable(CAP_NET_ADMIN)) @@ -839,8 +839,8 @@ static ssize_t store_rps_map(struct netdev_rx_queue *queue, } if (!cpumask_empty(mask)) { - hk_flags = HK_FLAG_DOMAIN | HK_FLAG_WQ; - cpumask_and(mask, mask, housekeeping_cpumask(hk_flags)); + cpumask_and(mask, mask, housekeeping_cpumask(HK_FLAG_DOMAIN)); + cpumask_and(mask, mask, housekeeping_cpumask(HK_FLAG_WQ)); if (cpumask_empty(mask)) { free_cpumask_var(mask); return -EINVAL; -- 2.25.1