* [PATCH net-next 0/2] enable and use static_branch_deferred_inc
@ 2019-06-13 15:08 Willem de Bruijn
2019-06-13 15:08 ` [PATCH net-next 1/2] locking/static_key: always define static_branch_deferred_inc Willem de Bruijn
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Willem de Bruijn @ 2019-06-13 15:08 UTC (permalink / raw)
To: jakub.kicinski, peterz
Cc: netdev, davem, edumazet, linux-kernel, Willem de Bruijn
From: Willem de Bruijn <willemb@google.com>
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(-)
--
2.22.0.rc2.383.gf4fbbf30c2-goog
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net-next 1/2] locking/static_key: always define static_branch_deferred_inc
2019-06-13 15:08 [PATCH net-next 0/2] enable and use static_branch_deferred_inc Willem de Bruijn
@ 2019-06-13 15:08 ` Willem de Bruijn
2019-06-13 15:08 ` [PATCH net-next 2/2] tcp: use static_branch_deferred_inc for clean_acked_data_enabled Willem de Bruijn
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Willem de Bruijn @ 2019-06-13 15:08 UTC (permalink / raw)
To: jakub.kicinski, peterz
Cc: netdev, davem, edumazet, linux-kernel, Willem de Bruijn
From: Willem de Bruijn <willemb@google.com>
This interface is currently only defined if CONFIG_JUMP_LABEL. Make it
available also when jump labels are off.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
---
include/linux/jump_label_ratelimit.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/jump_label_ratelimit.h b/include/linux/jump_label_ratelimit.h
index 42710d5949ba..8c3ee291b2d8 100644
--- a/include/linux/jump_label_ratelimit.h
+++ b/include/linux/jump_label_ratelimit.h
@@ -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 */
--
2.22.0.rc2.383.gf4fbbf30c2-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net-next 2/2] tcp: use static_branch_deferred_inc for clean_acked_data_enabled
2019-06-13 15:08 [PATCH net-next 0/2] enable and use static_branch_deferred_inc Willem de Bruijn
2019-06-13 15:08 ` [PATCH net-next 1/2] locking/static_key: always define static_branch_deferred_inc Willem de Bruijn
@ 2019-06-13 15:08 ` Willem de Bruijn
2019-06-13 17:09 ` [PATCH net-next 0/2] enable and use static_branch_deferred_inc Jakub Kicinski
2019-06-15 2:32 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Willem de Bruijn @ 2019-06-13 15:08 UTC (permalink / raw)
To: jakub.kicinski, peterz
Cc: netdev, davem, edumazet, linux-kernel, Willem de Bruijn
From: Willem de Bruijn <willemb@google.com>
Deferred static key clean_acked_data_enabled uses the deferred
variants of dec and flush. Do the same for inc.
Signed-off-by: Willem de Bruijn <willemb@google.com>
---
net/ipv4/tcp_input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 08a477e74cf3..9269bbfc05f9 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -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);
--
2.22.0.rc2.383.gf4fbbf30c2-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 0/2] enable and use static_branch_deferred_inc
2019-06-13 15:08 [PATCH net-next 0/2] enable and use static_branch_deferred_inc Willem de Bruijn
2019-06-13 15:08 ` [PATCH net-next 1/2] locking/static_key: always define static_branch_deferred_inc Willem de Bruijn
2019-06-13 15:08 ` [PATCH net-next 2/2] tcp: use static_branch_deferred_inc for clean_acked_data_enabled Willem de Bruijn
@ 2019-06-13 17:09 ` Jakub Kicinski
2019-06-15 2:32 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: Jakub Kicinski @ 2019-06-13 17:09 UTC (permalink / raw)
To: Willem de Bruijn
Cc: peterz, netdev, davem, edumazet, linux-kernel, Willem de Bruijn
On Thu, 13 Jun 2019 11:08:14 -0400, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
>
> 1. make static_branch_deferred_inc available if !CONFIG_JUMP_LABEL
> 2. convert the existing STATIC_KEY_DEFERRED_FALSE user to this api
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Thanks/sorry :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next 0/2] enable and use static_branch_deferred_inc
2019-06-13 15:08 [PATCH net-next 0/2] enable and use static_branch_deferred_inc Willem de Bruijn
` (2 preceding siblings ...)
2019-06-13 17:09 ` [PATCH net-next 0/2] enable and use static_branch_deferred_inc Jakub Kicinski
@ 2019-06-15 2:32 ` David Miller
3 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2019-06-15 2:32 UTC (permalink / raw)
To: willemdebruijn.kernel
Cc: jakub.kicinski, peterz, netdev, edumazet, linux-kernel, willemb
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: Thu, 13 Jun 2019 11:08:14 -0400
> From: Willem de Bruijn <willemb@google.com>
>
> 1. make static_branch_deferred_inc available if !CONFIG_JUMP_LABEL
> 2. convert the existing STATIC_KEY_DEFERRED_FALSE user to this api
Series applied.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-15 2:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 15:08 [PATCH net-next 0/2] enable and use static_branch_deferred_inc Willem de Bruijn
2019-06-13 15:08 ` [PATCH net-next 1/2] locking/static_key: always define static_branch_deferred_inc Willem de Bruijn
2019-06-13 15:08 ` [PATCH net-next 2/2] tcp: use static_branch_deferred_inc for clean_acked_data_enabled Willem de Bruijn
2019-06-13 17:09 ` [PATCH net-next 0/2] enable and use static_branch_deferred_inc Jakub Kicinski
2019-06-15 2:32 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).