1 From 2931bfc8dc735944ee4b76ab83f2c181c0673fa8 Mon Sep 17 00:00:00 2001
2 From: Josh Cartwright <joshc@ni.com>
3 Date: Tue, 27 Oct 2015 07:31:53 -0500
4 Subject: [PATCH 179/366] net: Make synchronize_rcu_expedited() conditional on
7 While the use of synchronize_rcu_expedited() might make
8 synchronize_net() "faster", it does so at significant cost on RT
9 systems, as expediting a grace period forcibly preempts any
10 high-priority RT tasks (via the stop_machine() mechanism).
12 Without this change, we can observe a latency spike up to 30us with
13 cyclictest by rapidly unplugging/reestablishing an ethernet link.
15 Suggested-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
16 Signed-off-by: Josh Cartwright <joshc@ni.com>
17 Cc: bigeasy@linutronix.de
18 Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
19 Acked-by: David S. Miller <davem@davemloft.net>
20 Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
21 Link: http://lkml.kernel.org/r/20151027123153.GG8245@jcartwri.amer.corp.natinst.com
22 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
25 1 file changed, 1 insertion(+), 1 deletion(-)
27 diff --git a/net/core/dev.c b/net/core/dev.c
28 index bfbf0b6..071f0b1 100644
31 @@ -7248,7 +7248,7 @@ EXPORT_SYMBOL(free_netdev);
32 void synchronize_net(void)
35 - if (rtnl_is_locked())
36 + if (rtnl_is_locked() && !IS_ENABLED(CONFIG_PREEMPT_RT_FULL))
37 synchronize_rcu_expedited();