[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[altq 91] Re: When a class is delayed (undertime)



Hi.

I traced the code again and read the paper "Experimental Results for
Class-Based Queueing"'s appendix B. I still have some quesitons.

Q1: in rmc_update_class_util() of file altq_rmclass.c line 1371
  pkt_time = pktlen * cl->ns_per_byte_;
......
1371:   /* set next idle to make avgidle 0 */
1372:   pkt_time += (1 - RM_POWER) * avgidle >> RM_FILTER_GAIN;
1373:   TV_ADD_DELTA(&ifd->ifnow_, pkt_time, &cl->undertime_);
It adds the pkt_time to ifd->ifnow_. The time added to ifd->ifnow should be
waiting time but not
interpacket time. But pkt_time is estimated interpacket time.

Q2: The above way to set undertime is for nonregulated class. For regulated
class, the waiting time  should be offtime. That is, a regulated class is
expected to wait for offtime and send minburst packets and then wait for
offtime again. So once a class becomes a regulated class. It should not wait
for
t(1/p - 1) (or pkt_time - packet transmission time)  + (1 - RM_POWER) *
avgidle >> RM_FILTER_GAIN

but should wait for offtime. The code in rmc_delay_action() function


now the waiting time is

1532: #else /* BORROW_OFFTIME */
1533:   TV_ADD_DELTA(&cl->undertime_, cl->offtime_, &cl->undertime_);
            #endif /* BORROW_OFFTIME */
  /* this code cancels the undertime set in rmc_update_class_util. */
1535:  TV_ADD_DELTA(&cl->undertime_,
        -((1 - RM_POWER) * cl->avgidle_) >> RM_FILTER_GAIN,
        &cl->undertime_);

Line 1535 cancels the undertime set in rmc_update_class_util(), but no code
is for canceling the pkt_time. Should the pkt_time be canceled?

Q3:We expect that for a regulated class it can wait for offtime, send
minburst packets and wait for offtime again. We don't want it to be punished
by the bandwidth it used before it's regulated. That's why we cancel
the -((1 - RM_POWER) * cl->avgidle_) >> RM_FILTER_GAIN (and may be the
pkt_time) in rmc_delay_action() function. It seems work well if the minburst
is of 1 packet.

1:A class become regulated(avgidle must be < 0).
2:Wait for offtime for 1 packet.
3:after offtime, this class can send again. The new avgidle may be > or <=
0. If >0, may go into regulated 4:again and wait for offtime. if <= 0, can
send immediately.
This class can have a changce to send 1 packet after waiting for offtime in
regulated status no matter how avgide < 0 before the class becomes
regulated.

But for classes with minburst > 1 said n.
1:A class become regulated(avgidle < 0).
2:Wait for offtime for n packet.
3:after offtime, this class can send again. We expect it to send n packtes.
That is, we hope the avgidle's value would >0 in the first n-1 packets. But
if the avgidle's value is very small ( very negative), the new avgidle will
turn to <= 0 before n-1 packets sent out  and it have no chance to send all
the n packets. In this sence, this regulated class is still be punished of
the bandwidth it used before becoming regulated.


Please tell me if my idea is wrong or discuss with me about them, thanks!

Lin Su-Mei



>Hello.
>
>You are right, but the original code (before the 18th June patch)
subtracted
>
>>         -((1 - RM_POWER) * cl->avgidle_) >> RM_FILTER_GAIN,
>
>from all packets.
>
> fulvio
>
>
>
>> -----Original Message-----
>> From: owner-altq@csl.sony.co.jp [mailto:owner-altq@csl.sony.co.jp]On
>> Behalf Of Lin Su-Mei
>> Sent: Monday, August 09, 1999 9:07 AM
>> To: altq
>> Cc: G Muthukumar; Kenjiro Cho
>> Subject: [altq 85] Re: When a class is delayed (undertime)
>>
>>
>>
>> I somehow agree with what Muthu said. Please check (Appendix A1 of "Link
>> sharing and resource management models for packet networks).
>> For a nonregulated class with avg negative, the time_to_send(undertime)
is
>> set to make the next avgidle become 0.
>> But for a regulated calss with avg negative, the link-sharing
>> scheduler sets
>> the undertime field for the class to f(s,b) (for minburst > 1, should be
>> offtime)  ahead of the current time. A regulated calss is never
restricted
>> by the link-sharing scheduler to less than its allocatd bandwidth,
>> regardless of the "excess" bandwidth used by that class in the
>> past. And in
>> the middle of A.3 in the same paper it says, the link-sharing
>> scheduler sets
>> the time-to-send field for a regulated class to f(s,b)=s/b (for minburst
>
>> 1, should be offtime) secondes ahead of the current time. .....at
>> that time
>> the general scheduler is allowed to send a packet from that class
>> regardless
>> of the value of avg.... . If the class is still overlimit after a
>> packet is
>> ent, then the time-to-send field is again set to f(s,b)=s/b
>> seconds ahead of
>> the current time.
>> So I also feel that this code
>>   TV_ADD_DELTA(&cl->undertime_,
>>         -((1 - RM_POWER) * cl->avgidle_) >> RM_FILTER_GAIN,
>>         &cl->undertime_);
>>
>> in rmc_delay_action()needs to be retained so that this regulated
>> class will
>> not be ponished by the bandwidth it used before.
>>
>> lsm
>
>
>