aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_qfq.c
diff options
context:
space:
mode:
authorPaolo Valente <paolo.valente@unimore.it>2013-03-05 03:05:01 -0500
committerDavid S. Miller <davem@davemloft.net>2013-03-06 02:47:05 -0500
commit40dd2d546198e7bbb8d3fe718957b158caa3fe52 (patch)
tree4a4683d08a970fd286309ad1a5ca507bdd7916c9 /net/sched/sch_qfq.c
parenta0143efa96671dc51dab9bba776a66f9bfa1757f (diff)
pkt_sched: sch_qfq: do not allow virtual time to jump if an aggregate is in service
By definition of (the algorithm of) QFQ+, the system virtual time must be pushed up only if there is no 'eligible' aggregate, i.e. no aggregate that would have started to be served also in the ideal system emulated by QFQ+. QFQ+ serves only eligible aggregates, hence the aggregate currently in service is eligible. As a consequence, to decide whether there is no eligible aggregate, QFQ+ must also check whether there is no aggregate in service. Signed-off-by: Paolo Valente <paolo.valente@unimore.it> Reviewed-by: Fabio Checconi <fchecconi@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_qfq.c')
-rw-r--r--net/sched/sch_qfq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sched/sch_qfq.c b/net/sched/sch_qfq.c
index c34af93ddfe2..6b7ce803d07c 100644
--- a/net/sched/sch_qfq.c
+++ b/net/sched/sch_qfq.c
@@ -1279,7 +1279,8 @@ static void qfq_schedule_agg(struct qfq_sched *q, struct qfq_aggregate *agg)
1279 /* group was surely ineligible, remove */ 1279 /* group was surely ineligible, remove */
1280 __clear_bit(grp->index, &q->bitmaps[IR]); 1280 __clear_bit(grp->index, &q->bitmaps[IR]);
1281 __clear_bit(grp->index, &q->bitmaps[IB]); 1281 __clear_bit(grp->index, &q->bitmaps[IB]);
1282 } else if (!q->bitmaps[ER] && qfq_gt(roundedS, q->V)) 1282 } else if (!q->bitmaps[ER] && qfq_gt(roundedS, q->V) &&
1283 q->in_serv_agg == NULL)
1283 q->V = roundedS; 1284 q->V = roundedS;
1284 1285
1285 grp->S = roundedS; 1286 grp->S = roundedS;