From nobody Wed Nov 27 00:37:58 2024 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.13]) (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 9FB361CBEB8; Tue, 15 Oct 2024 14:54:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729004059; cv=none; b=TL6YAw7auAp+goOMJJ3umu1f8F7GRSt1QTkNbOEu7BB6oLoFmWEL65KAaRwl0Bors2Fk+e2CAeA0/fee0/AhIlT8L+qACQu1ER7+osynVF2Eyinn8pzeifcpJCs4/VP+iAz7tf7T8xPKfbtAwloaZYMOapiykvhUfprVnjSSjlw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729004059; c=relaxed/simple; bh=tQu14JwbxzrPa5a9MiLdxfRNOKo0ysvLK8e1crTNaM4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YnJ1D4TS1Cyjb6oWLRtFwxsz6nQec2DGvypk+qMMwgebwnYob15NiXVzqgEL7m3rAZcYRlkSHl1KJ4xm09TLGAzhlKAyo+6B+iaBp9It6mkvLw9m40RbLgiIRKempDSvt5U898H9BceAVyn4u4nAXCKgHNTmlzSY+MzlW1+zfPg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NwtQN7mr; arc=none smtp.client-ip=192.198.163.13 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NwtQN7mr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1729004058; x=1760540058; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tQu14JwbxzrPa5a9MiLdxfRNOKo0ysvLK8e1crTNaM4=; b=NwtQN7mr8OcoqX7nPAGrQQ7cPh8M/xZyA3Vha6OOnf4SuUKbFAkCuE0o /jmF1DKL/vtj4ZLITt/THA0bp8/4BDhREZkTZkbtpzpXlvvAhatukOtJV ZtJNQYaeJqA+BdyFS2EgOshGLY84bORl+QNAoaV8oYEUDiWDcRqoBojD7 FbL1kpacpnf5cAZvLgJ7/dWJC0m1NRoDdV/O2Bp9vriTpk7+DL30+oSSP g+MYgQhxtrKGw3iMg12DbhE1YZfswnTzjYZiz+iMMRXvJhBEh0zQGKz6n ByIrPbcrgaxUmLOS5ONiJrQBt03Xw3hqhCiFo4mRdq/HKHs658cGFNbM3 g==; X-CSE-ConnectionGUID: +5ElF/74R2Ku+ISnrQ2dsg== X-CSE-MsgGUID: RcG1Yft/Q2aJW/w7t3POng== X-IronPort-AV: E=McAfee;i="6700,10204,11225"; a="31277451" X-IronPort-AV: E=Sophos;i="6.11,205,1725346800"; d="scan'208";a="31277451" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2024 07:54:17 -0700 X-CSE-ConnectionGUID: Xv/sdtDIR22mAnGjwVE/0A== X-CSE-MsgGUID: 8SkuyX2NTaiTLyZjgBmwVA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,199,1725346800"; d="scan'208";a="82723031" Received: from newjersey.igk.intel.com ([10.102.20.203]) by orviesa003.jf.intel.com with ESMTP; 15 Oct 2024 07:54:14 -0700 From: Alexander Lobakin To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Alexander Lobakin , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Alexei Starovoitov , Daniel Borkmann , John Fastabend , Andrii Nakryiko , Stanislav Fomichev , Magnus Karlsson , nex.sw.ncis.osdt.itp.upstreaming@intel.com, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v2 01/18] jump_label: export static_key_slow_{inc,dec}_cpuslocked() Date: Tue, 15 Oct 2024 16:53:33 +0200 Message-ID: <20241015145350.4077765-2-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.46.2 In-Reply-To: <20241015145350.4077765-1-aleksander.lobakin@intel.com> References: <20241015145350.4077765-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: quoted-printable Content-Type: text/plain; charset="utf-8" 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 93a822d3c468..1034c0348995 100644 --- a/kernel/jump_label.c +++ b/kernel/jump_label.c @@ -182,6 +182,7 @@ bool static_key_slow_inc_cpuslocked(struct static_key *= key) } return true; } +EXPORT_SYMBOL_GPL(static_key_slow_inc_cpuslocked); =20 bool static_key_slow_inc(struct static_key *key) { @@ -342,6 +343,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); =20 void __static_key_slow_dec_deferred(struct static_key *key, struct delayed_work *work, --=20 2.46.2