netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ipv6: use call_rcu_hurry() in fib6_info_release()
@ 2024-04-26 10:47 Eric Dumazet
  2024-04-26 11:21 ` Jiri Pirko
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Eric Dumazet @ 2024-04-26 10:47 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 c4e86b4363ac ("net: add two more
call_rcu_hurry()")

fib6_info_destroy_rcu() is calling nexthop_put() or fib6_nh_release()

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>
---
 include/net/ip6_fib.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 323c94f1845b9e3eed52a2a19a4871cf8174d9c2..7834f7f29d3c9323e753be9e46499784a619de1b 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -338,7 +338,7 @@ static inline void fib6_info_release(struct fib6_info *f6i)
 {
 	if (f6i && refcount_dec_and_test(&f6i->fib6_ref)) {
 		DEBUG_NET_WARN_ON_ONCE(!hlist_unhashed(&f6i->gc_link));
-		call_rcu(&f6i->rcu, fib6_info_destroy_rcu);
+		call_rcu_hurry(&f6i->rcu, fib6_info_destroy_rcu);
 	}
 }
 
-- 
2.44.0.769.g3c40516874-goog


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

* Re: [PATCH net-next] ipv6: use call_rcu_hurry() in fib6_info_release()
  2024-04-26 10:47 [PATCH net-next] ipv6: use call_rcu_hurry() in fib6_info_release() Eric Dumazet
@ 2024-04-26 11:21 ` Jiri Pirko
  2024-04-26 14:31 ` David Ahern
  2024-04-29  9:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2024-04-26 11:21 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: David S . Miller, Jakub Kicinski, Paolo Abeni, David Ahern,
	netdev, eric.dumazet

Fri, Apr 26, 2024 at 12:47:22PM CEST, edumazet@google.com wrote:
>This is a followup of commit c4e86b4363ac ("net: add two more
>call_rcu_hurry()")
>
>fib6_info_destroy_rcu() is calling nexthop_put() or fib6_nh_release()
>
>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>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

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

* Re: [PATCH net-next] ipv6: use call_rcu_hurry() in fib6_info_release()
  2024-04-26 10:47 [PATCH net-next] ipv6: use call_rcu_hurry() in fib6_info_release() Eric Dumazet
  2024-04-26 11:21 ` Jiri Pirko
@ 2024-04-26 14:31 ` David Ahern
  2024-04-29  9:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: David Ahern @ 2024-04-26 14:31 UTC (permalink / raw)
  To: Eric Dumazet, David S . Miller, Jakub Kicinski, Paolo Abeni
  Cc: netdev, eric.dumazet

On 4/26/24 4:47 AM, Eric Dumazet wrote:
> This is a followup of commit c4e86b4363ac ("net: add two more
> call_rcu_hurry()")
> 
> fib6_info_destroy_rcu() is calling nexthop_put() or fib6_nh_release()
> 
> 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>
> ---
>  include/net/ip6_fib.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 


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


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

* Re: [PATCH net-next] ipv6: use call_rcu_hurry() in fib6_info_release()
  2024-04-26 10:47 [PATCH net-next] ipv6: use call_rcu_hurry() in fib6_info_release() Eric Dumazet
  2024-04-26 11:21 ` Jiri Pirko
  2024-04-26 14:31 ` David Ahern
@ 2024-04-29  9:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-04-29  9:10 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 Fri, 26 Apr 2024 10:47:22 +0000 you wrote:
> This is a followup of commit c4e86b4363ac ("net: add two more
> call_rcu_hurry()")
> 
> fib6_info_destroy_rcu() is calling nexthop_put() or fib6_nh_release()
> 
> We must not delay it too much or risk unregister_netdevice/ref_tracker
> traces because references to netdev are not released in time.
> 
> [...]

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

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] 4+ messages in thread

end of thread, other threads:[~2024-04-29  9:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-26 10:47 [PATCH net-next] ipv6: use call_rcu_hurry() in fib6_info_release() Eric Dumazet
2024-04-26 11:21 ` Jiri Pirko
2024-04-26 14:31 ` David Ahern
2024-04-29  9:10 ` 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).