enable and use static_branch_deferred_inc
Subsystems (4)
cover enable and use static_branch_deferred_inc
From: Willem de Bruijn <[email protected]>
1. make static_branch_deferred_inc available if !CONFIG_JUMP_LABEL
2. convert the existing STATIC_KEY_DEFERRED_FALSE user to this api
Willem de Bruijn (2):
locking/static_key: always define static_branch_deferred_inc
tcp: use static_branch_deferred_inc for clean_acked_data_enabled
include/linux/jump_label_ratelimit.h | 5 +++-- net/ipv4/tcp_input.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
Signature · 1 line
2.22.0.rc2.383.gf4fbbf30c2-goog
PATCH 1/2 locking/static_key: always define static_branch_deferred_inc
From: Willem de Bruijn <[email protected]>
This interface is currently only defined if CONFIG_JUMP_LABEL. Make it available also when jump labels are off.
--- include/linux/jump_label_ratelimit.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
include/linux/jump_label_ratelimit.h +3 -2
@@ -60,8 +60,6 @@ extern void jump_label_update_timeout(struct work_struct *work); 0), \ } -#define static_branch_deferred_inc (x) static_branch_inc(&(x)->key) -#else /* !CONFIG_JUMP_LABEL */ struct static_key_deferred { struct static_key key;
@@ -95,4 +93,7 @@ jump_label_rate_limit(struct static_key_deferred *key,STATIC_KEY_CHECK_USE (key); }#endif /* CONFIG_JUMP_LABEL */ + +#define static_branch_deferred_inc (x) static_branch_inc(&(x)->key) +#endif /* _LINUX_JUMP_LABEL_RATELIMIT_H */
Signature · 1 line
2.22.0.rc2.383.gf4fbbf30c2-goog
PATCH 2/2 tcp: use static_branch_deferred_inc for clean_acked_data_enabled
In reply to Willem de BruijnFrom: Willem de Bruijn <[email protected]>
Deferred static key clean_acked_data_enabled uses the deferred variants of dec and flush. Do the same for inc.
--- net/ipv4/tcp_input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv4/tcp_input.c +1 -1
@@ -119,7 +119,7 @@ void clean_acked_data_enable(struct inet_connection_sock *icsk, void (*cad)(struct sock *sk, u32 ack_seq)) { icsk->icsk_clean_acked = cad; -static_branch_inc (&clean_acked_data_enabled.key); +static_branch_deferred_inc (&clean_acked_data_enabled); }EXPORT_SYMBOL_GPL (clean_acked_data_enable);
Signature · 1 line
2.22.0.rc2.383.gf4fbbf30c2-goog
Quoted 4 lines · Willem de Bruijn
From: Willem de Bruijn <[email protected]>
1. make
static_branch_deferred_incavailable if !CONFIG_JUMP_LABEL
2. convert the existingSTATIC_KEY_DEFERRED_FALSEuser to this api
Thanks/sorry :)
David Miller
maintainerFrom: Willem de Bruijn <[email protected]>
Date: Thu, 13 Jun 2019 11:08:14 -0400
Quoted 4 lines
From: Willem de Bruijn <[email protected]>
1. make
static_branch_deferred_incavailable if !CONFIG_JUMP_LABEL
2. convert the existingSTATIC_KEY_DEFERRED_FALSEuser to this api
Series applied.