diff options
author | Josh Cartwright <joshc@ni.com> | 2015-10-27 07:31:53 -0500 |
---|---|---|
committer | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2016-02-13 00:36:22 +0100 |
commit | 6892886eb57f049b2c9c71b470bcb0e7006fbd92 (patch) | |
tree | 415d578dd9c1a9a0852a8798cbe76a97827b45fd | |
parent | a15b548a0505f12c08d2d26af73040fa499f7fe2 (diff) | |
download | rt-linux-6892886eb57f049b2c9c71b470bcb0e7006fbd92.tar.gz |
net: Make synchronize_rcu_expedited() conditional on !RT_FULL
While the use of synchronize_rcu_expedited() might make
synchronize_net() "faster", it does so at significant cost on RT
systems, as expediting a grace period forcibly preempts any
high-priority RT tasks (via the stop_machine() mechanism).
Without this change, we can observe a latency spike up to 30us with
cyclictest by rapidly unplugging/reestablishing an ethernet link.
Suggested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Josh Cartwright <joshc@ni.com>
Cc: bigeasy@linutronix.de
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20151027123153.GG8245@jcartwri.amer.corp.natinst.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 7e6eb5b4c4998..7fc168e8d7e6d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -7217,7 +7217,7 @@ EXPORT_SYMBOL(free_netdev); void synchronize_net(void) { might_sleep(); - if (rtnl_is_locked()) + if (rtnl_is_locked() && !IS_ENABLED(CONFIG_PREEMPT_RT_FULL)) synchronize_rcu_expedited(); else synchronize_rcu(); |