diff --git a/[refs] b/[refs] index ba1bb3062b3a..da5c6eb1cabc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 85a43a9edaf5b541381acbf4061bace1121d6ef0 +refs/heads/master: d5b8aa1d246fddfe4042be6f6eb169efa5cfbb94 diff --git a/trunk/net/sched/sch_generic.c b/trunk/net/sched/sch_generic.c index b4c680900d7a..d253c16a314c 100644 --- a/trunk/net/sched/sch_generic.c +++ b/trunk/net/sched/sch_generic.c @@ -189,15 +189,17 @@ static inline int qdisc_restart(struct Qdisc *q) void __qdisc_run(struct Qdisc *q) { - unsigned long start_time = jiffies; + int quota = weight_p; + int work = 0; while (qdisc_restart(q)) { + work++; /* - * Postpone processing if - * 1. another process needs the CPU; - * 2. we've been doing it for too long. + * Ordered by possible occurrence: Postpone processing if + * 1. we've exceeded packet quota + * 2. another process needs the CPU; */ - if (need_resched() || jiffies != start_time) { + if (work >= quota || need_resched()) { __netif_schedule(q); break; }