* [PATCH] codel: reduce default maxpacket and reinitialize upon re-entering drop state
@ 2012-09-01 18:50 Dave Täht
2012-09-02 23:05 ` Eric Dumazet
0 siblings, 1 reply; 2+ messages in thread
From: Dave Täht @ 2012-09-01 18:50 UTC (permalink / raw)
To: Eric Dumazet, netdev; +Cc: Dave Taht
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;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] codel: reduce default maxpacket and reinitialize upon re-entering drop state
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
0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2012-09-02 23:05 UTC (permalink / raw)
To: Dave Täht; +Cc: netdev
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-02 23:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).