netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: anycast: use call_rcu_hurry() in aca_put()
@ 2024-04-29 18:36 Eric Dumazet
  2024-04-29 18:51 ` David Ahern
  2024-05-01 10:50 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Dumazet @ 2024-04-29 18:36 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: David Ahern, netdev, eric.dumazet, Eric Dumazet

This is a followup of commit b5327b9a300e ("ipv6: use
call_rcu_hurry() in fib6_info_release()").

I had another pmtu.sh failure, and found another lazy
call_rcu() causing this failure.

aca_free_rcu() calls fib6_info_release() which releases
devices references.

We must not delay it too much or risk unregister_netdevice/ref_tracker
traces because references to netdev are not released in time.

This should speedup device/netns dismantles when CONFIG_RCU_LAZY=y

Signed-off-by: Eric Dumazet <edumazet@google.com>
---
 net/ipv6/anycast.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c
index 0f2506e3535925468dcc5fa6cc30ae0952a67ea7..0627c4c18d1a5067a668da778ad444855194cbeb 100644
--- a/net/ipv6/anycast.c
+++ b/net/ipv6/anycast.c
@@ -252,9 +252,8 @@ static void aca_free_rcu(struct rcu_head *h)
 
 static void aca_put(struct ifacaddr6 *ac)
 {
-	if (refcount_dec_and_test(&ac->aca_refcnt)) {
-		call_rcu(&ac->rcu, aca_free_rcu);
-	}
+	if (refcount_dec_and_test(&ac->aca_refcnt))
+		call_rcu_hurry(&ac->rcu, aca_free_rcu);
 }
 
 static struct ifacaddr6 *aca_alloc(struct fib6_info *f6i,
-- 
2.44.0.769.g3c40516874-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ipv6: anycast: use call_rcu_hurry() in aca_put()
  2024-04-29 18:36 [PATCH net-next] ipv6: anycast: use call_rcu_hurry() in aca_put() Eric Dumazet
@ 2024-04-29 18:51 ` David Ahern
  2024-05-01 10:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: David Ahern @ 2024-04-29 18:51 UTC (permalink / raw)
  To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, eric.dumazet

On 4/29/24 12:36 PM, Eric Dumazet wrote:
> This is a followup of commit b5327b9a300e ("ipv6: use
> call_rcu_hurry() in fib6_info_release()").
> 
> I had another pmtu.sh failure, and found another lazy
> call_rcu() causing this failure.
> 
> aca_free_rcu() calls fib6_info_release() which releases
> devices references.
> 
> We must not delay it too much or risk unregister_netdevice/ref_tracker
> traces because references to netdev are not released in time.
> 
> This should speedup device/netns dismantles when CONFIG_RCU_LAZY=y
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  net/ipv6/anycast.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] ipv6: anycast: use call_rcu_hurry() in aca_put()
  2024-04-29 18:36 [PATCH net-next] ipv6: anycast: use call_rcu_hurry() in aca_put() Eric Dumazet
  2024-04-29 18:51 ` David Ahern
@ 2024-05-01 10:50 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-05-01 10:50 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: davem, kuba, pabeni, dsahern, netdev, eric.dumazet

Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Mon, 29 Apr 2024 18:36:43 +0000 you wrote:
> This is a followup of commit b5327b9a300e ("ipv6: use
> call_rcu_hurry() in fib6_info_release()").
> 
> I had another pmtu.sh failure, and found another lazy
> call_rcu() causing this failure.
> 
> aca_free_rcu() calls fib6_info_release() which releases
> devices references.
> 
> [...]

Here is the summary with links:
  - [net-next] ipv6: anycast: use call_rcu_hurry() in aca_put()
    https://git.kernel.org/netdev/net-next/c/fff6e6accdb7

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-01 10:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29 18:36 [PATCH net-next] ipv6: anycast: use call_rcu_hurry() in aca_put() Eric Dumazet
2024-04-29 18:51 ` David Ahern
2024-05-01 10:50 ` patchwork-bot+netdevbpf

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).