blob: f10ebc2d956513929d0057ce7d1dec379973b6f3 [file] [log] [blame]
From 1e6fac40ce92bddccdd0ac30a92a0a11b20c73f8 Mon Sep 17 00:00:00 2001
From: Eric Dumazet <edumazt@google.com>
Date: Tue, 5 Mar 2013 07:15:13 +0000
Subject: [PATCH] net: reduce net_rx_action() latency to 2 HZ
commit d1f41b67ff7735193bc8b418b98ac99a448833e2 upstream.
We should use time_after_eq() to get maximum latency of two ticks,
instead of three.
Bug added in commit 24f8b2385 (net: increase receive packet quantum)
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/net/core/dev.c b/net/core/dev.c
index 2aaf2e6..253b409 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3045,7 +3045,7 @@ static void net_rx_action(struct softirq_action *h)
* Allow this to run for 2 jiffies since which will allow
* an average latency of 1.5/HZ.
*/
- if (unlikely(budget <= 0 || time_after(jiffies, time_limit)))
+ if (unlikely(budget <= 0 || time_after_eq(jiffies, time_limit)))
goto softnet_break;
local_irq_enable();
--
1.8.1.2