[Codel] Fwd: count and rec_inv_sqrt initialization
Eric Dumazet
eric.dumazet at gmail.com
Fri Jul 27 01:12:56 EDT 2012
On Thu, 2012-07-26 at 16:47 -0700, Anton Mich wrote:
> Hi Eric,
>
> Thanks for looking into this!
> May I also ask what is the intuition behind using this delta (which
> is, in my understanding, equal to the number of drops between the
> lastcount and the current count) as the new count value? I tried to
> track down in the codel list when this changed from what's in the
> paper, pseudocode and NS-2 to what is now in Linux but I didn't find
> anything.
>
Kathleen & Van are still discussing of what should be exactly done here.
The delta idea came from them, at a moment no public discussion was
happening (before publication, we were privately implementing codel)
Before the delta, we had following codes :
Version v1 -> v6 : (05/03/2012 -> 05/05/2012)
+ if (now.tv64 - q->drop_next.tv64 <
+ 16 * q->interval.tv64) {
+ int c = q->count - 1;
+ q->count = c < 1 ? 1 : c;
+ } else {
+ q->count = 1;
+ }
But count was growing and was not going back to lower values
I suggested to use instead :
if (now - drop_next< 16.*interval) {
unsigned int c = q->count >> 1;
count = c < 1 ? 1 : c;
else {
count = 1;
}
Then we also tried
c = min(q->count - 1, q->count - (q->count>>4));
(Dave even had a module param :)
static u32 count_rescale(struct codel_sched_data *q, codel_time_t now) {
s32 c = 1;
if (codel_time_after(now - q->drop_next, 16 * q->interval)) {
switch(decrease_method) {
case 3:
break;
case 2: /* Dumazet 2 */
c = q->count >> 1;
break;
case 1: /* Dumazet 1 */
c = min(q->count - 1,
q->count - (q->count >> 4));
break;
case 0: /* Codel Paper Default */
default:
c = q->count - 1;
}
c = max(1U, c);
}
return (u32) c;
}
in v13 ( 05/10/2012) we had the current form
But codel is not finalized ;)
More information about the Codel
mailing list