Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1185284rdb; Fri, 22 Dec 2023 19:03:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/VmOi+sb0Ejax46GGAFk4eRXNgy1GHGYGYDhhixTsefOkQrIeWsv1XOWDIrhbRdi1KMcl X-Received: by 2002:ad4:5011:0:b0:67f:a8c7:71c8 with SMTP id s17-20020ad45011000000b0067fa8c771c8mr1484223qvo.101.1703300634121; Fri, 22 Dec 2023 19:03:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703300634; cv=none; d=google.com; s=arc-20160816; b=wISiu4753EI44+ICMIN8jQaYdHwmTgOUjuKOWEQYwD5coe7YZGyz6W/w8NS19uvalI ZdERpo4jKWZrjPr7DPVeceY69UDjb1+VdIWI+VbrDxED/s/XWX/Xl83ja71F28ILRNjv 99b53H+1bfSVrE4sXCq79JElIw18KY78vKVbdD7yeFREJsyxzV919OJQ5yJSV+X+tAgg RNctM2SNqV1qv3tW6coT0lhR6PW6E5x9C3ftWk41ofXCJTOUQiNr6T1Tvrgvd2qwonBq wsxO7RU2oGsSdp0hEfW+EnFrWcPCMUOSitJP7k+mzhwrDT3QT+6pf2UoYJ9UiC9NSL3R D+Hw== 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=+x51UjUsqJIskbt6IqzRGY/nszBXhTvB/FXuRwcLn5E=; fh=J3H3jkZRTdH/CD0R7uXO8r43FYFiJ1FqB2ouoqeBxmQ=; b=CFJkbawtUhZVfFw5NyaxycJopRZ4oIKTb8ky9R0vXeTHj/Mee/zyrksoti/wDtY2WA gBEW1xukvWV37vLeEFlw10BnKKDz/6cl28kUnGI+eEujZlnTyBLHVWRj631uaiipDQ/p UmnljWEHDmGlR3HORToC9uuKy54D0F3Jw1kiHn5Prqzl683Ak/JIf8HOvS1c8pA96vJ7 w5y3GggocZh4B34f5XWZxXIVS+YRujzGY2iMqRMiayolxiJqnG5d/L2D0vdhcJhm5Q82 Trjdv0skqyK4aqgB26yMFgTgUa6f/0j/VTTLXpYrnhwVP3lUEeDAdkjedUcpCUnhMU/D D2iQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MvEWwNfd; spf=pass (google.com: domain of linux-kernel+bounces-10232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10232-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j26-20020a0cae9a000000b0067f86344f8csi4524418qvd.371.2023.12.22.19.03.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:03:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MvEWwNfd; spf=pass (google.com: domain of linux-kernel+bounces-10232-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10232-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DCEAC1C22AD7 for ; Sat, 23 Dec 2023 03:03:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B8737286B1; Sat, 23 Dec 2023 02:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MvEWwNfd" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A70752837A; Sat, 23 Dec 2023 02:59:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703300345; x=1734836345; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2Cam6ielx4SiTFi9eZoINF4R5A6ww9rh77PqH8LO7LY=; b=MvEWwNfdMDBTgN8s8ujU89w5D54sd0rs8g/+9h8OQZHikMWsFrL6t+Ze t4Z4ezLdZmOsRWEtbqP+jLlGE4saKDjMrJk3okORnCKZrt7mZNpdQmQxx AACzWfD+RQU4+PtxNFyrT2wYRsNpzWgbt4rswAgh4uxxRxpOE1Vz0dZ9D r1io/UicwYBhD9lqNHD1yFZxTf1uZnMLhswJwU8Py7HVAsWlf3VK+0l8d quV7wZ+0di3I0gPzTLFMr3BfK+zWRdI4HPTciKjea0os4HeNQcdFsJqhf O5B5ver9jj4jOiotDKYYr+yYHEztXlNf985sNn/rb4gl6gFp8iauUAWRN A==; X-IronPort-AV: E=McAfee;i="6600,9927,10932"; a="386610903" X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="386610903" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 18:59:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,298,1695711600"; d="scan'208";a="25537510" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orviesa001.jf.intel.com with ESMTP; 22 Dec 2023 18:59:02 -0800 From: Alexander Lobakin To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Alexander Lobakin , Maciej Fijalkowski , Michal Kubiak , Larysa Zaremba , Alexei Starovoitov , Daniel Borkmann , Willem de Bruijn , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RFC net-next 16/34] jump_label: export static_key_slow_{inc,dec}_cpuslocked() Date: Sat, 23 Dec 2023 03:55:36 +0100 Message-ID: <20231223025554.2316836-17-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231223025554.2316836-1-aleksander.lobakin@intel.com> References: <20231223025554.2316836-1-aleksander.lobakin@intel.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 Sometimes, there's a need to modify a lot of static keys or modify the same key multiple times in a loop. In that case, it seems more optimal to lock cpu_read_lock once and then call _cpuslocked() variants. The enable/disable functions are already exported, the refcounted counterparts however are not. Fix that to allow modules to save some cycles. Signed-off-by: Alexander Lobakin --- kernel/jump_label.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/jump_label.c b/kernel/jump_label.c index d9c822bbffb8..f0375372b484 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -177,6 +177,7 @@ bool static_key_slow_inc_cpuslocked(struct static_key *key) jump_label_unlock(); return true; } +EXPORT_SYMBOL_GPL(static_key_slow_inc_cpuslocked); bool static_key_slow_inc(struct static_key *key) { @@ -304,6 +305,7 @@ void static_key_slow_dec_cpuslocked(struct static_key *key) STATIC_KEY_CHECK_USE(key); __static_key_slow_dec_cpuslocked(key); } +EXPORT_SYMBOL_GPL(static_key_slow_dec_cpuslocked); void __static_key_slow_dec_deferred(struct static_key *key, struct delayed_work *work, -- 2.43.0