Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88013
b: refs/heads/master
c: 2ba2506
h: refs/heads/master
i:
  88011: a5df6fc
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Mar 28, 2008
1 parent 051c442 commit 1b22940
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 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: 32aced7509cb20ef3ec67c9b56f5b55c41dd4f8d
refs/heads/master: 2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0
18 changes: 15 additions & 3 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,22 @@ static inline int qdisc_restart(struct net_device *dev)

void __qdisc_run(struct net_device *dev)
{
do {
if (!qdisc_restart(dev))
unsigned long start_time = jiffies;

while (qdisc_restart(dev)) {
if (netif_queue_stopped(dev))
break;

/*
* Postpone processing if
* 1. another process needs the CPU;
* 2. we've been doing it for too long.
*/
if (need_resched() || jiffies != start_time) {
netif_schedule(dev);
break;
} while (!netif_queue_stopped(dev));
}
}

clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
}
Expand Down

0 comments on commit 1b22940

Please sign in to comment.