Message ID | 20231223025554.2316836-17-aleksander.lobakin@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-10232-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1461079dyi; Fri, 22 Dec 2023 19:04:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IG40yTWWkwfP6bSTGJ2yX0aqTDKuJVMCeqjSsirxx1x2/mzmGbiCWZ+auoNwLBRWiKjrUgd X-Received: by 2002:a05:6871:b0f:b0:1e9:badb:acaa with SMTP id fq15-20020a0568710b0f00b001e9badbacaamr2936098oab.23.1703300655193; Fri, 22 Dec 2023 19:04:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703300655; cv=none; d=google.com; s=arc-20160816; b=ZBk7k9eyRSx22vodjEqKXn75NGv9Rr0I60UEtKOhEEgayhXffkkX1PKvI86YfzbnxM /YjQRnmOe/1cVD4gzmsdSZ0G8anHTP9s3aIKgfE6T3xlqDTMBWXJjFTrjs1yfd60glvd 2E5AQSQCP8IKIe8BYTi+byOq3Mu9+zI0CBNiSLIakvq/MY6eM5Eu1HhApAASys6YAjcs 14BEiGwyq+30hqdCHvlJRFJ7tb2pb9upYiT04KkaUZQZcEPcSCdOC4GqpxmuYlea0RKd 2Grf/N4jyBPgRAKlrLiuMzlAYfB+OAgvEF7p1seDoRC78Fqwir+wanEaNA4SBUOGxLCP bfNQ== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10232-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f3-20020a631f03000000b005cdd60a42f5si4178596pgf.838.2023.12.22.19.04.14 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 19:04:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10232-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10232-ouuuleilei=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 5B606B227EA for <ouuuleilei@gmail.com>; Sat, 23 Dec 2023 03:04:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8205C28E21; Sat, 23 Dec 2023 02:59:09 +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 <aleksander.lobakin@intel.com> To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: Alexander Lobakin <aleksander.lobakin@intel.com>, Maciej Fijalkowski <maciej.fijalkowski@intel.com>, Michal Kubiak <michal.kubiak@intel.com>, Larysa Zaremba <larysa.zaremba@intel.com>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Willem de Bruijn <willemdebruijn.kernel@gmail.com>, 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786040187781661978 X-GMAIL-MSGID: 1786040187781661978 |
Series |
Christmas 3-serie XDP for idpf (+generic stuff)
|
|
Commit Message
Alexander Lobakin
Dec. 23, 2023, 2:55 a.m. UTC
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 <aleksander.lobakin@intel.com>
---
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,