Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: Jonathan Morton <chromatix99@gmail.com>
Cc: cake@lists.bufferbloat.net
Subject: Re: [Cake] openwrt build with latest cake and other qdiscs
Date: Thu, 14 May 2015 19:27:13 -0700	[thread overview]
Message-ID: <CAA93jw7J1maU6EO3kiPLMGhJSuGCRtkUp3634k-3Jn-1NgiPkw@mail.gmail.com> (raw)
In-Reply-To: <5334C435-218A-48CF-8AB2-F73F76F47216@gmail.com>

Well, there is a lot of redundant work being done in cake_enqueue in
this case - the diffserv lookup (which might not be redundant but
usually is), the hashing (which will be), grabbing the timestamp
(probably won't hurt to just grab it once for the whole aggregate),
and so on down through cake_enqueue

I do not have sufficient expertise to evaluate the rest. But would
certainly like to benchmark it as is.

On Thu, May 14, 2015 at 3:06 PM, Jonathan Morton <chromatix99@gmail.com> wrote:
>
>> On 14 May, 2015, at 21:15, Sebastian Moeller <moeller0@gmx.de> wrote:
>>
>> I guess your idea of peeling for ATM carrier and for >1ms wire time aggregates sounds like a decent idea…
>
> Code review time, then:
>
>         /*
>          * We tolerate GSO aggregates if they occupy < 1ms of wire time
>          * AND we don't need to perform ATM cell-framing.  We're unlikely
>          * to need the latter above 24Mbps (best ADSL downlink), where
>          * handling individual packets is still cheap.
>          *
>          * But if those conditions aren't met, we need to split it.
>          */
>         if(unlikely(len > (q->rate_bps >> 10) ||
>                         (q->rate_flags & CAKE_FLAG_ATM)) &&
>                         skb_is_gso(skb))
>         {
>                 struct sk_buff *segs, *nskb;
>                 netdev_features_t features = netif_skb_features(skb);
>                 int ret = NET_XMIT_DROP;
>
>                 segs = skb_gso_segment(skb, features & ~NETIF_F_GSO_MASK);
>
>                 if (IS_ERR_OR_NULL(segs))
>                         return qdisc_reshape_fail(skb, sch);
>
>                 while (segs) {
>                         nskb = segs->next;
>                         segs->next = NULL;
>                         qdisc_skb_cb(segs)->pkt_len = segs->len;
>
>                         switch(cake_enqueue(segs, sch)) {
>                                 case NET_XMIT_CN:
>                                         ret = NET_XMIT_CN;
>                                         /* fall */
>
>                                 case NET_XMIT_SUCCESS:
>                                         if(ret == NET_XMIT_DROP)
>                                                 ret = NET_XMIT_SUCCESS;
>                                         qdisc_tree_decrease_qlen(sch, -1);
>                                         /* fall */
>
>                                 default:;
>                         }
>                         segs = nskb;
>                 }
>
>                 qdisc_tree_decrease_qlen(sch, 1);
>                 consume_skb(skb);
>                 return ret;
>         }
>
> I’m thinking of inserting the above into the beginning of cake_enqueue().  This of course makes it a recursive function (but only by one level).
>
> A bit of lateral thinking was necessary to convert the equivalent code in TBF (which relies on a child qdisc to do the actual queuing) into a form that cake could use, so I’m not pushing it to git until someone can spot what, if anything, I’ve got horribly wrong.  However, it does compile and doesn’t seem to crash when I run it on a box with GSO turned on, so it’s probably worth a cautious try.
>
> One quirk is that, in its current form, it’ll *always* peel GSO aggregates in unlimited mode.  That’s because rate_bps is zero in that case.  I could clean up that test by having a separate “peeling threshold” calculated at configure time.
>
>  - Jonathan Morton
>
> _______________________________________________
> Cake mailing list
> Cake@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/cake



-- 
Dave Täht
Open Networking needs **Open Source Hardware**

https://plus.google.com/u/0/+EricRaymond/posts/JqxCe2pFr67

  reply	other threads:[~2015-05-15  2:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-10 14:02 Alan Jenkins
2015-05-10 17:29 ` Alan Jenkins
2015-05-10 20:37   ` Dave Taht
2015-05-10 20:38     ` Dave Taht
2015-05-11  6:54       ` Sebastian Moeller
2015-05-10 21:46   ` Sebastian Moeller
2015-05-10 22:19     ` Dave Taht
2015-05-11  6:50   ` Sebastian Moeller
2015-05-11  7:01     ` Jonathan Morton
2015-05-13  6:43       ` Jonathan Morton
2015-05-14  9:19         ` Sebastian Moeller
2015-05-14 10:24           ` Jonathan Morton
2015-05-14 10:33             ` Alan Jenkins
2015-05-14 10:42               ` Jonathan Morton
2015-05-14 10:58             ` Sebastian Moeller
2015-05-14 13:12               ` Jonathan Morton
2015-05-14 14:57                 ` Sebastian Moeller
2015-05-14 15:32                   ` Jonathan Morton
2015-05-14 18:15                     ` Sebastian Moeller
2015-05-14 22:06                       ` Jonathan Morton
2015-05-15  2:27                         ` Dave Taht [this message]
2015-05-15 21:49                           ` Jonathan Morton
2015-05-14  9:50   ` Alan Jenkins
2015-05-18  0:49     ` [Cake] More overhead keywords Jonathan Morton
2015-05-18  7:27       ` Sebastian Moeller
2015-05-18  8:13         ` Jonathan Morton
2015-05-18  8:41           ` Sebastian Moeller
2015-05-18 19:41           ` David Lang
2015-05-18 19:57             ` Dave Taht
2015-05-19 10:14               ` Kevin Darbyshire-Bryant
2015-05-23  0:30       ` Dave Taht
2015-05-23  2:27         ` Jonathan Morton
  -- strict thread matches above, loose matches on Subject: below --
2015-05-05  8:50 [Cake] openwrt build with latest cake and other qdiscs Dave Taht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA93jw7J1maU6EO3kiPLMGhJSuGCRtkUp3634k-3Jn-1NgiPkw@mail.gmail.com \
    --to=dave.taht@gmail.com \
    --cc=cake@lists.bufferbloat.net \
    --cc=chromatix99@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox