Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4159979rdb; Thu, 28 Dec 2023 12:10:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4mRvr9sqgNlaTKM6iXeoPrmmMhEISo59SyeWG3I0TzW9On5y7Lcd9vCMHvLbuB6Ujf8P7 X-Received: by 2002:a05:6512:1087:b0:50e:6b69:6ab9 with SMTP id j7-20020a056512108700b0050e6b696ab9mr4755064lfg.21.1703794227031; Thu, 28 Dec 2023 12:10:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703794227; cv=none; d=google.com; s=arc-20160816; b=BK+zUoJHBKNUu3wWW8m/fJkMuyODp7ThBDFKrDkuVywg/mtZEx49Bkpx8F5FbCY68t tFRtg/OGDEXlOYURhw+U29WfWcRQXF2HxX1okVGiNLdJEUV8cyv12Yt9N0GKiHxRsM4X VxEeRnLt5Hci3fq55s35jT5Jx/RUI5ciWEjhNhpRCkxU2+woKWfKYJIwj/rLjmh9Aipk QPU6TkWV9plwoSeOlrqnqAFU/afVbwCz0CKEgvB1eVbZhB9bADTwW6AoF4M9HFv67UKg cQXB1+somOPfb/2yUw3VSEGEiLdD47/oQU19YCmYhz/1CRYDk4Z8eQEdIQ3SR5W4u3DP 6XOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=OZXxoyrdPME2Vm14lDGLzixuTAYKwkD/pDvmny1lU3w=; fh=kL/RA2Gd9NuQcovU0+7My8qgZ6xDrReyLO6zCGgffAQ=; b=mfv9cFeXMRG9GHHzRIf1O+id45woSXTMhktQehTNKBefDArIlQ4UqsKltfsqcb6HZ7 uWu4qqTkeMXlDLMywHvdiR0OpVqBNhf7hsKOxDgDPIQTkyv1l37+F6TPfTInu1rbPRgf sdfmyV+GKECgWEVuPM4TAQXX8nkEPsocWyk+i5eBPalvbAC2D4mfGqlc9CEyPD3+ghJD ZNtAbo7JhllL1lhotNbgs6Jl8szaHnGBC5w/Nk5WUxPXg5UDAUTlVWBNq5Z+opaVV+cm E8yzJamZt3Jmtv/fE2khsuZun0gobmJusiUU+m7mj1bb5y9PGQ5YpXoh5/5CUUhdO9G7 0j4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=f6qTVTvP; spf=pass (google.com: domain of linux-kernel+bounces-12844-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12844-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id t6-20020a50ab46000000b0055535467f60si2320068edc.271.2023.12.28.12.10.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 12:10:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12844-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=f6qTVTvP; spf=pass (google.com: domain of linux-kernel+bounces-12844-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12844-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C31C31F23C70 for ; Thu, 28 Dec 2023 20:10:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0586B10A21; Thu, 28 Dec 2023 20:09:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="f6qTVTvP" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-yw1-f179.google.com (mail-yw1-f179.google.com [209.85.128.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5EBE10950 for ; Thu, 28 Dec 2023 20:09:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-yw1-f179.google.com with SMTP id 00721157ae682-5e7467eb93aso40915817b3.1 for ; Thu, 28 Dec 2023 12:09:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703794183; x=1704398983; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OZXxoyrdPME2Vm14lDGLzixuTAYKwkD/pDvmny1lU3w=; b=f6qTVTvPQ9p3f2VrmgZNP5CSz1wdgcEriZ51p7lkhAEACQfjIceDNaZt4en6IfQVLy GFcRTPL6qda5sKU/DCBbxaSHrARmMP2I0ug1xjrFCLvjgSLeXdt8A2RRM/BbdDVzpfyl tf5//xiBBYsVoLNp0VVrAdY7Q9bEthvZvpdUHwO+3O9hZYBOR+7wTkoJCHVHz/+mVCWP CyyI87QDVRCNWVAF71GUdz/tj3O+kr2tV8ivkQqrdnceMIs43ekaWpejoFPf2/ZgoK6X mYge7sv7BVaf4/sLuOHP9eVWvJL5lbV9b9tXH+WcTD3L57w664/D+2qoMDP5rgWW6bsQ KXxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703794183; x=1704398983; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OZXxoyrdPME2Vm14lDGLzixuTAYKwkD/pDvmny1lU3w=; b=c2RXw+uUDM3tf6/gBu4n1PEH/mg7xOiO31P47YGmEji9CcO1G76KZuYZj+3qoRMLrf 9pXchiCrDRcSF4B8jiaakv3XHH1blEqYPJlDm6YDKJ01eQHRlWc6ikif4QEX6uRV7KQp 2DT8bbJHyGWw2rIrd+kGCAl1Omg/JYu9k2RMvrHj0UWXhENPQE2WwxVNztSEByA2z0vx 0a1wOKo22YI2Ya9UQcS5CcqPhy1HpM9Qdh6rBvD8AFBfVXbI975b/sUq4rjpK0pbLfC6 +YzX9w3ZtN75sX6uE+whrd0xv3hoYJsuUZro6Nqfxe8u3gvefo5jp22qJHGDcxp1kOmD OnlA== X-Gm-Message-State: AOJu0YxcgldXAMCsDexmc2FGpJ36zFEXkRKmN9lAqsVurXgRI2P7KdjH wsvN5cEtPxu5hd5XEH8ApJs= X-Received: by 2002:a81:de0d:0:b0:5ee:7299:e2cf with SMTP id k13-20020a81de0d000000b005ee7299e2cfmr1564530ywj.52.1703794182867; Thu, 28 Dec 2023 12:09:42 -0800 (PST) Received: from localhost ([2601:344:8301:57f0:967c:a333:ae09:3f60]) by smtp.gmail.com with ESMTPSA id l17-20020a814011000000b005ed71d004b5sm2887863ywn.62.2023.12.28.12.09.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 12:09:42 -0800 (PST) From: Yury Norov To: Andrew Morton , Thomas Gleixner , Ming Lei , linux-kernel@vger.kernel.org Cc: Yury Norov , Andy Shevchenko , Rasmus Villemoes Subject: [PATCH 3/9] lib/group_cpus: relax atomicity requirement in grp_spread_init_one() Date: Thu, 28 Dec 2023 12:09:30 -0800 Message-Id: <20231228200936.2475595-4-yury.norov@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20231228200936.2475595-1-yury.norov@gmail.com> References: <20231228200936.2475595-1-yury.norov@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Because nmsk and irqmsk are stable, extra atomicity is not required. Signed-off-by: Yury Norov NAKed-by: Ming Lei --- lib/group_cpus.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/group_cpus.c b/lib/group_cpus.c index 063ed9ae1b8d..0a8ac7cb1a5d 100644 --- a/lib/group_cpus.c +++ b/lib/group_cpus.c @@ -24,8 +24,8 @@ static void grp_spread_init_one(struct cpumask *irqmsk, struct cpumask *nmsk, if (cpu >= nr_cpu_ids) return; - cpumask_clear_cpu(cpu, nmsk); - cpumask_set_cpu(cpu, irqmsk); + __cpumask_clear_cpu(cpu, nmsk); + __cpumask_set_cpu(cpu, irqmsk); cpus_per_grp--; /* If the cpu has siblings, use them first */ @@ -36,8 +36,8 @@ static void grp_spread_init_one(struct cpumask *irqmsk, struct cpumask *nmsk, if (cpus_per_grp-- == 0) return; - cpumask_clear_cpu(sibl, nmsk); - cpumask_set_cpu(sibl, irqmsk); + __cpumask_clear_cpu(sibl, nmsk); + __cpumask_set_cpu(sibl, irqmsk); } } } -- 2.40.1