From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Dave Täht" <dave.taht@bufferbloat.net>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH] codel: reduce default maxpacket and reinitialize upon re-entering drop state
Date: Mon, 03 Sep 2012 01:05:11 +0200 [thread overview]
Message-ID: <1346627111.2563.51.camel@edumazet-glaptop> (raw)
In-Reply-To: <1346525457-31481-1-git-send-email-dave.taht@bufferbloat.net>
On Sat, 2012-09-01 at 11:50 -0700, Dave Täht wrote:
> From: Dave Taht <dave.taht@bufferbloat.net>
>
> The minimum size packet in a queue is 64, not 256.
>
> Also, as ethtool can be used to remove tso/gso/ufo, the last seen
> maxpacket can vary considerably in size (e.g. 64k). So reset it
> on re-entering the drop scheduler to the most recent packet size,
> and let it grow again naturally.
>
> Signed-off-by: Dave Taht <dave.taht@bufferbloat.net>
> ---
> include/net/codel.h | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/include/net/codel.h b/include/net/codel.h
> index 389cf62..0b0ac5e 100644
> --- a/include/net/codel.h
> +++ b/include/net/codel.h
> @@ -170,7 +170,7 @@ static void codel_vars_init(struct codel_vars *vars)
>
> static void codel_stats_init(struct codel_stats *stats)
> {
> - stats->maxpacket = 256;
> + stats->maxpacket = 64;
> }
>
> /*
> @@ -333,6 +333,7 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
> */
> codel_Newton_step(vars);
> } else {
> + stats->maxpacket = skb ? qdisc_pkt_len(skb) : 64;
> vars->count = 1;
> vars->rec_inv_sqrt = ~0U >> REC_INV_SQRT_SHIFT;
> }
This has very litle value.
maxpacket is mainly an information given to "tc -s qdisc".
It serves as a debugging stuff, to know the max packet size seen on
codel qdisc.
So you can set it to 0 as far as I am concerned, but not reset it in
codel_enqueue(), as it adds runtime overhead and a branch misprediction.
prev parent reply other threads:[~2012-09-02 23:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-01 18:50 [PATCH] codel: reduce default maxpacket and reinitialize upon re-entering drop state Dave Täht
2012-09-02 23:05 ` Eric Dumazet [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1346627111.2563.51.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=dave.taht@bufferbloat.net \
--cc=netdev@vger.kernel.org \
/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