From: Eric Dumazet <eric.dumazet@gmail.com>
To: Vimalkumar <j.vimal@gmail.com>
Cc: davem@davemloft.net, Jamal Hadi Salim <jhs@mojatatu.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] htb: improved accuracy at high rates
Date: Sat, 20 Oct 2012 09:47:22 +0200 [thread overview]
Message-ID: <1350719242.13333.339.camel@edumazet-glaptop> (raw)
In-Reply-To: <1350685582-65334-1-git-send-email-j.vimal@gmail.com>
On Fri, 2012-10-19 at 15:26 -0700, Vimalkumar wrote:
> Current HTB (and TBF) uses rate table computed by
> the "tc" userspace program, which has the following
> issue:
>
> The rate table has 256 entries to map packet lengths
> to token (time units). With TSO sized packets, the
> 256 entry granularity leads to loss/gain of rate,
> making the token bucket inaccurate.
>
> Thus, instead of relying on rate table, this patch
> explicitly computes the time and accounts for packet
> transmission times with nanosec granularity.
>
> This greatly improves accuracy of HTB with a wide
> range of packet sizes.
>
> Example:
>
> tc qdisc add dev $dev root handle 1: \
> htb default 1
>
> tc class add dev $dev classid 1:1 parent 1: \
> rate 1Gbit mtu 64k
>
> Ideally it should work with all intermediate sized
> packets as well, but...
>
> Test:
> for i in {1..20}; do
> (netperf -H $host -t UDP_STREAM -l 30 -- -m $size &);
> done
>
> With size=400 bytes: achieved rate ~600Mb/s
> With size=1000 bytes: achieved rate ~835Mb/s
> With size=8000 bytes: achieved rate ~1012Mb/s
>
> With new HTB, in all cases, we achieve ~1000Mb/s.
> Many thanks to Eric Dumazet for review and feedback.
>
> Signed-off-by: Vimalkumar <j.vimal@gmail.com>
> ---
Thanks Vimal for this promising work.
I am going to test it, but my preliminary remarks are :
1) This is a net-next work, so its better to add the net-next tag in
the title, as in :
"[PATCH net-next] htb: improved accuracy at high rates"
So next submission will also include a version tag as in :
"[PATCH net-next V2] htb: improved accuracy at high rates"
2) I dont know how you generated your diff, but its not applicable
without knowing where file is located.
So instead of
diff --git a/sch_htb.c b/sch_htb.c
index 29b942c..a808ba1 100644
--- a/sch_htb.c
+++ b/sch_htb.c
we need the proper :
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index 9d75b77..13e02b3 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
3) Always use an up2date net-next tree before submitting an official
patch.
Here is what I have applying your patch (once I fixed the path)
patching file net/sched/sch_htb.c
Hunk #9 succeeded at 612 (offset -3 lines).
Hunk #10 succeeded at 654 (offset -3 lines).
Hunk #11 succeeded at 704 (offset -3 lines).
Hunk #12 succeeded at 715 (offset -3 lines).
Hunk #13 succeeded at 902 (offset -2 lines).
Hunk #14 succeeded at 915 (offset -2 lines).
Hunk #15 succeeded at 934 (offset -2 lines).
Hunk #16 succeeded at 1121 (offset -1 lines).
It means you worked on an old version, so its always suspicious
next prev parent reply other threads:[~2012-10-20 7:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-19 22:26 [PATCH] htb: improved accuracy at high rates Vimalkumar
2012-10-19 23:52 ` Rick Jones
2012-10-20 0:51 ` Vimal
2012-10-22 17:35 ` Rick Jones
2012-10-20 7:26 ` Eric Dumazet
2012-10-20 16:41 ` Vimal
2012-10-20 7:47 ` Eric Dumazet [this message]
2012-10-20 10:29 ` Eric Dumazet
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=1350719242.13333.339.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=j.vimal@gmail.com \
--cc=jhs@mojatatu.com \
--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