[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 97] cbq update
I've been trying to fix the minburst behavior of CBQ that Fulvio
Apparently, it works much better after fixing the bugs listed below.
I also tried to eliminate ifnow_ in struct ifdat as Fulvio suggested
but I found it breaks the borrowing mechanism.
So, I decided to leave ifnow_ as it is until we come up with a better
way to handle borrowing.
ifnow_ keeps the estimated finish time and it is the source of the
complexity because we have to manage 2 timelines; one for the real
time and the other for the estimated finish time.
But it turns out that ifnow is crucial to borrowing; it prevents the
root class from getting overlimit.
ifnow_ keeps the calculated sending rate below the wire speed.
If the sending rate exceeds the wire speed, the root class becomes
overlimit and other classes are no longer able to borrow the bandwidth.
ifnow_ could diverge from the real-time when the network card has a
Fulvio argued that device buffers should be small. I agree with him
in principle but, in reality, many existing drivers use as much buffer
space as possible and we have to handle those drivers.
ifnow_ surely introduces the complexity in calculation and the
fluctuation of the time gap could lead to minor errors in
calculation. I would appreciate any suggestion on this problem.
A snapshot of the current code is available from:
The update includes
1. a bug was introduced on 1999/6/18
pkt_time should be added to tidle
pointed out by Fulvio Risso <F.Risso@cs.ucl.ac.uk>
and G Muthukumar <firstname.lastname@example.org>.
2. we can't simply add offtime to the suspention time
in rmc_delay_action() since undertime already includes
new method: save pkt_time and cancel it when we
add offtime to suspend a class.
pointed out Lin Su-Mei <email@example.com>
3. minburst to offtime calculation
wrong: gtom = pow(g, (double)(minburst));
correct: gtom = pow(g, (double)(minburst-1));
pointed out by Fulvio and Lin Su-Mei
4. minidle calculation:
minidle is defined as a penalty bound
for excess bandwidth use in the past
but there has been no reasoning behind minidle
now the max penalty is the target waiting time
of the class.
pointed out by Lin Su-Mei