]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: reduce net_rx_action() latency to 2 HZ
authorEric Dumazet <edumazet@google.com>
Tue, 5 Mar 2013 07:15:13 +0000 (07:15 +0000)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Mon, 10 Feb 2014 21:10:56 +0000 (16:10 -0500)
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>
net/core/dev.c

index 2aaf2e610f92decb3f68c1a7c082efe4db60f8aa..253b409fe3abd604b23655a5833fa926e4fd1a82 100644 (file)
@@ -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();