Skip to content

Commit

Permalink
net: reduce net_rx_action() latency to 2 HZ
Browse files Browse the repository at this point in the history
We should use time_after_eq() to get maximum latency of two ticks,
instead of three.

Bug added in commit 24f8b23 (net: increase receive packet quantum)

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Mar 6, 2013
1 parent 691b3b7 commit d1f41b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4103,7 +4103,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();
Expand Down

0 comments on commit d1f41b6

Please sign in to comment.