[Codel] old time in queue patch
Dave Taht
dave.taht at gmail.com
Tue May 1 06:01:35 EDT 2012
Back in november we came up with several ways of timestamping packets.
Never figured out a drop strategy.
Eric Dumazet had come up with this one.
http://patchwork.ozlabs.org/patch/125329/
The kernel devs are allergic (rightly so) to extending the size of the
skb. It seemed plausible (for everything
except advanced qdiscs such as netem) to instead cut the size of the
qdisc control block (currently 48 bytes)
to 40 and prepend a timestamp there, so that what that patch does.
I have lying around somewhere the iproute2 patches for the above, also
from eric. (who is not on this
list presently).
Also lying around somewhere is the tfifo and fifot and tfifot patches
I'd done in the
same time period, which allowed use of a qdisc construction set -
marking packets on entry,
checking on exit, or doing both in the same qdisc. This made it
possible to layer something like
qfq or sfq or sfb or many of the alternatives we were playing with
with a final layer that checked
the timestamp and did 'something rational', which we never figured out
how to do...
Similar principle as to the above patch... except
I'd just blithely added a queuestamp to the main skb and got roundly
thwacked for it.
Work following that qfq+fifot implementation (sfqred) strongly
suggested that doing everything required in one qdisc led to saner
buffering strategies. We ran into issues with htb holding onto rather
than peeking at, packets in the queue.
It is also possible, but something of a cross layer violation to
leverage the existing HW timestamping facility.
I like measuring the entire length of queue from actual entry to exit,
a lot, as that measures the overall
system load as well.
from include/linux/skbuff.h
#define HAVE_HW_TIME_STAMP
/**
* struct skb_shared_hwtstamps - hardware time stamps
* @hwtstamp: hardware time stamp transformed into duration
* since arbitrary point in time
* @syststamp: hwtstamp transformed to system time base
*
* Software time stamps generated by ktime_get_real() are stored in
* skb->tstamp. The relation between the different kinds of time
* stamps is as follows:
*
* syststamp and tstamp can be compared against each other in
* arbitrary combinations. The accuracy of a
* syststamp/tstamp/"syststamp from other device" comparison is
* limited by the accuracy of the transformation into system time
* base. This depends on the device driver and its underlying
* hardware.
*
* hwtstamps can only be compared against other hwtstamps from
* the same device.
* This structure is attached to packets as part of the
* &skb_shared_info. Use skb_hwtstamps() to get a pointer.
*/
struct skb_shared_hwtstamps {
ktime_t hwtstamp;
ktime_t syststamp;
};
I have lying around somewhere the iproute2 patches for the above.
--
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
http://www.bufferbloat.net
More information about the Codel
mailing list