From: Patrick McHardy <kaber@trash.net>
To: Denys Fedorysychenko <nuclearcat@nuclearcat.com>
Cc: netdev@vger.kernel.org, Jeff Garzik <jeff@garzik.org>,
Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: HFSC classes going out of bounds, regression in recent kernels?
Date: Tue, 06 Apr 2010 17:37:39 +0200 [thread overview]
Message-ID: <4BBB5543.40607@trash.net> (raw)
In-Reply-To: <201004061822.21735.nuclearcat@nuclearcat.com>
[-- Attachment #1: Type: text/plain, Size: 593 bytes --]
Denys Fedorysychenko wrote:
> I notice on one of my QoS machines that HFSC start going out of bandwidth
> limits. The most terrible thing - it happens suddenly, and if i just relaunch
> QoS script - everything will work fine.
That sounds like there's an overflow somewhere.
> I'm not sure it is not my mistake, but most probably it is a bug.
> I can't tell for sure when it is happened, last kernel was on this machine
> 2.6.28 i guess, or maybe even older.
Looking through the recent patches in this area, my prime suspect
is the attached patch. Does reverting it make any difference?
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1726 bytes --]
commit a4a710c4a7490587406462bf1d54504b7783d7d7
Author: Jarek Poplawski <jarkao2@gmail.com>
Date: Mon Jun 8 22:05:13 2009 +0000
pkt_sched: Change PSCHED_SHIFT from 10 to 6
Change PSCHED_SHIFT from 10 to 6 to increase schedulers time
resolution. This will increase 16x a number of (internal) ticks per
nanosecond, and is needed to improve accuracy of schedulers based on
rate tables, like HTB, TBF or CBQ, with rates above 100Mbit. It is
assumed this change is safe for 32bit accounting of time diffs up
to 2 minutes, which should be enough for common use (extremely low
rate values may overflow, so get inaccurate instead). To make full
use of this change an updated iproute2 will be needed. (But using
older iproute2 should be safe too.)
This change breaks ticks - microseconds similarity, so some minor code
fixes might be needed. It is also planned to change naming adequately
eg. to PSCHED_TICKS2NS() etc. in the near future.
Reported-by: Antonio Almeida <vexwek@gmail.com>
Tested-by: Antonio Almeida <vexwek@gmail.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h
index cd0e026..120935b 100644
--- a/include/net/pkt_sched.h
+++ b/include/net/pkt_sched.h
@@ -41,8 +41,8 @@ static inline void *qdisc_priv(struct Qdisc *q)
typedef u64 psched_time_t;
typedef long psched_tdiff_t;
-/* Avoid doing 64 bit divide by 1000 */
-#define PSCHED_SHIFT 10
+/* Avoid doing 64 bit divide */
+#define PSCHED_SHIFT 6
#define PSCHED_US2NS(x) ((s64)(x) << PSCHED_SHIFT)
#define PSCHED_NS2US(x) ((x) >> PSCHED_SHIFT)
next prev parent reply other threads:[~2010-04-06 15:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-06 15:22 HFSC classes going out of bounds, regression in recent kernels? Denys Fedorysychenko
2010-04-06 15:37 ` Patrick McHardy [this message]
2010-04-06 15:45 ` Denys Fedorysychenko
2010-04-11 2:10 ` Denys Fedorysychenko
2010-05-20 1:34 ` Denys Fedorysychenko
2010-05-31 17:53 ` Michal Soltys
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=4BBB5543.40607@trash.net \
--to=kaber@trash.net \
--cc=eric.dumazet@gmail.com \
--cc=jeff@garzik.org \
--cc=netdev@vger.kernel.org \
--cc=nuclearcat@nuclearcat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.