diff options
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r-- | net/sched/sch_generic.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index b4c680900d7a..69fca2798804 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -189,15 +189,15 @@ static inline int qdisc_restart(struct Qdisc *q) | |||
189 | 189 | ||
190 | void __qdisc_run(struct Qdisc *q) | 190 | void __qdisc_run(struct Qdisc *q) |
191 | { | 191 | { |
192 | unsigned long start_time = jiffies; | 192 | int quota = weight_p; |
193 | 193 | ||
194 | while (qdisc_restart(q)) { | 194 | while (qdisc_restart(q)) { |
195 | /* | 195 | /* |
196 | * Postpone processing if | 196 | * Ordered by possible occurrence: Postpone processing if |
197 | * 1. another process needs the CPU; | 197 | * 1. we've exceeded packet quota |
198 | * 2. we've been doing it for too long. | 198 | * 2. another process needs the CPU; |
199 | */ | 199 | */ |
200 | if (need_resched() || jiffies != start_time) { | 200 | if (--quota <= 0 || need_resched()) { |
201 | __netif_schedule(q); | 201 | __netif_schedule(q); |
202 | break; | 202 | break; |
203 | } | 203 | } |