lkml.org 
[lkml]   [2020]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4] net: use exponential backoff in netdev_wait_allrefs
From
From: fruggeri@arista.com (Francesco Ruggeri)
Date: Fri, 18 Sep 2020 13:19:01 -0700

> The combination of aca_free_rcu, introduced in commit 2384d02520ff
> ("net/ipv6: Add anycast addresses to a global hashtable"), and
> fib6_info_destroy_rcu, introduced in commit 9b0a8da8c4c6 ("net/ipv6:
> respect rcu grace period before freeing fib6_info"), can result in
> an extra rcu grace period being needed when deleting an interface,
> with the result that netdev_wait_allrefs ends up hitting the msleep(250),
> which is considerably longer than the required grace period.
> This can result in long delays when deleting a large number of interfaces,
> and it can be observed with this script:
...
> Time with this patch on a 5.4 kernel:
>
> real 0m7.704s
> user 0m0.385s
> sys 0m1.230s
>
> Time without this patch:
>
> real 0m31.522s
> user 0m0.438s
> sys 0m1.156s
>
> v2: use exponential backoff instead of trying to wake up
> netdev_wait_allrefs.
> v3: preserve reverse christmas tree ordering of local variables
> v4: try an extra rcu_barrier before the backoff, plus some
> cosmetic changes.
>
> Signed-off-by: Francesco Ruggeri <fruggeri@arista.com>

Applied to net-next, thanks.

\
 
 \ /
  Last update: 2020-09-18 22:48    [W:0.034 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site