Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 121708
b: refs/heads/master
c: 24f8b23
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger authored and David S. Miller committed Nov 4, 2008
1 parent ef50528 commit ffc784f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b9ac99855dcc0316ba2feee2b0d3e578f8315b75
refs/heads/master: 24f8b2385e03a4f4c8dac513d03b5eaa475822b9
11 changes: 4 additions & 7 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -2373,7 +2373,7 @@ EXPORT_SYMBOL(__napi_schedule);
static void net_rx_action(struct softirq_action *h)
{
struct list_head *list = &__get_cpu_var(softnet_data).poll_list;
unsigned long start_time = jiffies;
unsigned long time_limit = jiffies + 2;
int budget = netdev_budget;
void *have;

Expand All @@ -2384,13 +2384,10 @@ static void net_rx_action(struct softirq_action *h)
int work, weight;

/* If softirq window is exhuasted then punt.
*
* Note that this is a slight policy change from the
* previous NAPI code, which would allow up to 2
* jiffies to pass before breaking out. The test
* used to be "jiffies - start_time > 1".
* Allow this to run for 2 jiffies since which will allow
* an average latency of 1.5/HZ.
*/
if (unlikely(budget <= 0 || jiffies != start_time))
if (unlikely(budget <= 0 || time_after(jiffies, time_limit)))
goto softnet_break;

local_irq_enable();
Expand Down

0 comments on commit ffc784f

Please sign in to comment.