mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 04:47:05 +00:00
net: use synchronize_rcu_expedited in cleanup_net()
cleanup_net() is calling synchronize_rcu() right before acquiring RTNL. synchronize_rcu() is much slower than synchronize_rcu_expedited(), and cleanup_net() is currently single threaded. In many workloads we want cleanup_net() to be fast, in order to free memory and various sysfs and procfs entries as fast as possible. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
2cd0c51e3b
commit
78c3253f27
1 changed files with 1 additions and 1 deletions
|
@ -622,7 +622,7 @@ static void cleanup_net(struct work_struct *work)
|
||||||
* the rcu_barrier() below isn't sufficient alone.
|
* the rcu_barrier() below isn't sufficient alone.
|
||||||
* Also the pre_exit() and exit() methods need this barrier.
|
* Also the pre_exit() and exit() methods need this barrier.
|
||||||
*/
|
*/
|
||||||
synchronize_rcu();
|
synchronize_rcu_expedited();
|
||||||
|
|
||||||
rtnl_lock();
|
rtnl_lock();
|
||||||
list_for_each_entry_reverse(ops, &pernet_list, list) {
|
list_for_each_entry_reverse(ops, &pernet_list, list) {
|
||||||
|
|
Loading…
Reference in a new issue