From: Jarek Poplawski <jarkao2@gmail.com>
To: Changli Gao <xiaosuo@gmail.com>
Cc: Jamal Hadi Salim <hadi@cyberus.ca>, devik@cdi.cz, netdev@vger.kernel.org
Subject: Re: [PATCH] sch_htb.c consume the classes's tokens bellow the HTB_CAN_SEND level
Date: Wed, 4 Nov 2009 00:00:35 +0100 [thread overview]
Message-ID: <20091103230035.GA2352@ami.dom.local> (raw)
In-Reply-To: <412e6f7f0911030518w7a5f02a4ue8a4b6539496dd8f@mail.gmail.com>
On Tue, Nov 03, 2009 at 09:18:49PM +0800, Changli Gao wrote:
> On Tue, Nov 3, 2009 at 6:05 PM, Jarek Poplawski <jarkao2@gmail.com> wrote:
> >
> > The ceil specification is controlled only by ctokens, which are always
> > updated, so no such risk.
> >
> Nevertheless, updating tokens is necessary too.
If it's really necessary you should present some test case fixed by
your patch, I guess.
In the meantime let's consider what could be broken:
class 1:1 (parent) rate 10 packets/sec
class 1:2 rate 5 packets/sec ceil 10 packets/sec
class 1:3 rate 5 packets/sec ceil 10 packets/sec
class 1:2 doesn't use all its rate, and sends every other second
(in even seconds)
class 1:3 sends 10 packets during the first second, so with your
patch it will use its tokens for 2 seconds
class 1:2 uses its rate in the second second..., so class 1:1
can't lend anything
class 1:3 can only borrow, so it won't be able to send during
this second anything
So, the effect would be class 1:3 sending every odd second 10 packets
while every even second - nothing...
Of course the example is a simplification of the htb algorithm. There
should be also considered priority of borrowing, which should add
similar effects even with regular traffic. But generally the
guaranteed rates would be simply... less guaranteed.
Regards,
Jarek P.
next prev parent reply other threads:[~2009-11-03 23:01 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-03 2:41 [PATCH] sch_htb.c consume the classes's tokens bellow the HTB_CAN_SEND level Changli Gao
2009-11-03 8:00 ` Jarek Poplawski
2009-11-03 9:47 ` Changli Gao
2009-11-03 10:05 ` Jarek Poplawski
2009-11-03 13:18 ` Changli Gao
2009-11-03 23:00 ` Jarek Poplawski [this message]
2009-11-04 1:53 ` Changli Gao
2009-11-04 8:28 ` Jarek Poplawski
2009-11-04 9:16 ` Changli Gao
2009-11-04 10:42 ` Jarek Poplawski
2009-11-04 10:58 ` Martin Devera
2009-11-04 11:30 ` Changli Gao
2009-11-04 11:51 ` Martin Devera
2009-11-04 11:58 ` Martin Devera
2009-11-04 12:08 ` Changli Gao
2009-11-04 12:15 ` Martin Devera
2009-11-05 5:44 ` Changli Gao
2009-11-04 11:21 ` Changli Gao
2009-11-04 11:49 ` Jarek Poplawski
2009-11-04 12:01 ` Changli Gao
2009-11-04 12:11 ` Jarek Poplawski
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=20091103230035.GA2352@ami.dom.local \
--to=jarkao2@gmail.com \
--cc=devik@cdi.cz \
--cc=hadi@cyberus.ca \
--cc=netdev@vger.kernel.org \
--cc=xiaosuo@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;
as well as URLs for NNTP newsgroup(s).