Skip to content

Commit

Permalink
pkt_sched: sch_qfq: remove a useless invocation of qfq_update_eligible
Browse files Browse the repository at this point in the history
QFQ+ can select for service only 'eligible' aggregates, i.e.,
aggregates that would have started to be served also in the emulated
ideal system.  As a consequence, for QFQ+ to be work conserving, at
least one of the active aggregates must be eligible when it is time to
choose the next aggregate to serve.

The set of eligible aggregates is updated through the function
qfq_update_eligible(), which does guarantee that, after its
invocation, at least one of the active aggregates is eligible.
Because of this property, this function is invoked in
qfq_deactivate_agg() to guarantee that at least one of the active
aggregates is still eligible after an aggregate has been deactivated.
In particular, the critical case is when there are other active
aggregates, but the aggregate being deactivated happens to be the only
one eligible.

However, this precaution is not needed for QFQ+ to be work conserving,
because update_eligible() is always invoked also at the beginning of
qfq_choose_next_agg(). This patch removes the additional invocation of
update_eligible() in qfq_deactivate_agg().

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>
  • Loading branch information
Paolo Valente authored and David S. Miller committed Mar 6, 2013
1 parent 40dd2d5 commit 76e4cb0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/sched/sch_qfq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1383,8 +1383,6 @@ static void qfq_deactivate_agg(struct qfq_sched *q, struct qfq_aggregate *agg)
__set_bit(grp->index, &q->bitmaps[s]);
}
}

qfq_update_eligible(q);
}

static void qfq_qlen_notify(struct Qdisc *sch, unsigned long arg)
Expand Down

0 comments on commit 76e4cb0

Please sign in to comment.