From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by huchra.bufferbloat.net (Postfix) with ESMTPS id 2217F202177 for ; Tue, 1 May 2012 03:01:37 -0700 (PDT) Received: by werf13 with SMTP id f13so4524511wer.16 for ; Tue, 01 May 2012 03:01:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=KIZ/ve+MgwB3c1LMOd2XzK00iFfSe4TskusdMB54GaE=; b=p1hnFLz3/rhyUuWcqxZhyI+SJoNpyAW3bjCnB+yKPszjNhm38fgqYfnGgDycG2pOWL FHGfdH9p9+7OtGdkcX1XJ/Mm4vmBwbx/mW4EslAJkAM18URpZW6ZzX+T0KACAbpTiLU3 KysIMQIW1Ss8tgX9zQ+m3QlKwZUl0h4LsJGQYIZj2oK+CZOtTZgpvGP0XTkW5/6TGGkj ilkFuAZdPzpV/JL/zeeSdJzdmxYcWwf4ILgquJRmWmT6VxTLxzCNT+seUDrDatObmS2e HGA/dZwxKiEW4719kmD/f1TtscuZ9GCAiUjbkqEouRCiX/JkxZjhWMhotIMR+KbCC33Z 437w== MIME-Version: 1.0 Received: by 10.180.88.169 with SMTP id bh9mr4016414wib.5.1335866495109; Tue, 01 May 2012 03:01:35 -0700 (PDT) Received: by 10.223.112.66 with HTTP; Tue, 1 May 2012 03:01:35 -0700 (PDT) Date: Tue, 1 May 2012 03:01:35 -0700 Message-ID: From: Dave Taht To: codel@lists.bufferbloat.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Codel] old time in queue patch X-BeenThere: codel@lists.bufferbloat.net X-Mailman-Version: 2.1.13 Precedence: list List-Id: CoDel AQM discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 May 2012 10:01:38 -0000 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. --=20 Dave T=E4ht SKYPE: davetaht US Tel: 1-239-829-5608 http://www.bufferbloat.net