[kernel] r19403 - in dists/sid/linux/debian: . patches patches/features/all/codel
Ben Hutchings
benh at alioth.debian.org
Sat Sep 29 12:20:39 UTC 2012
Author: benh
Date: Sat Sep 29 12:20:38 2012
New Revision: 19403
Log:
codel: refine one condition to avoid a nul rec_inv_sqrt
Added:
dists/sid/linux/debian/patches/features/all/codel/0008-codel-refine-one-condition-to-avoid-a-nul-rec_inv_sq.patch
Modified:
dists/sid/linux/debian/changelog
dists/sid/linux/debian/patches/series
Modified: dists/sid/linux/debian/changelog
==============================================================================
--- dists/sid/linux/debian/changelog Wed Sep 26 22:59:39 2012 (r19402)
+++ dists/sid/linux/debian/changelog Sat Sep 29 12:20:38 2012 (r19403)
@@ -1,3 +1,9 @@
+linux (3.2.30-2) UNRELEASED; urgency=low
+
+ * codel: refine one condition to avoid a nul rec_inv_sqrt
+
+ -- Ben Hutchings <ben at decadent.org.uk> Sat, 29 Sep 2012 14:19:46 +0200
+
linux (3.2.30-1) unstable; urgency=low
* New upstream stable update:
Added: dists/sid/linux/debian/patches/features/all/codel/0008-codel-refine-one-condition-to-avoid-a-nul-rec_inv_sq.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux/debian/patches/features/all/codel/0008-codel-refine-one-condition-to-avoid-a-nul-rec_inv_sq.patch Sat Sep 29 12:20:38 2012 (r19403)
@@ -0,0 +1,53 @@
+From: Eric Dumazet <edumazet at google.com>
+Date: Sun, 29 Jul 2012 20:52:21 +0000
+Subject: codel: refine one condition to avoid a nul rec_inv_sqrt
+
+commit 2359a47671fc4fb0fe5e9945f76c2cb10792c0f8 upstream.
+
+One condition before codel_Newton_step() was not good if
+we never left the dropping state for a flow. As a result
+rec_inv_sqrt was 0, instead of the ~0 initial value.
+
+codel control law was then set to a very aggressive mode, dropping
+many packets before reaching 'target' and recovering from this problem.
+
+To keep codel_vars_init() as efficient as possible, refine
+the condition to make sure rec_inv_sqrt initial value is correct
+
+Many thanks to Anton Mich for discovering the issue and suggesting
+a fix.
+
+Reported-by: Anton Mich <lp2s1h at gmail.com>
+Signed-off-by: Eric Dumazet <edumazet at google.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ include/net/codel.h | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/include/net/codel.h b/include/net/codel.h
+index 550debf..389cf62 100644
+--- a/include/net/codel.h
++++ b/include/net/codel.h
+@@ -305,6 +305,8 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
+ }
+ }
+ } else if (drop) {
++ u32 delta;
++
+ if (params->ecn && INET_ECN_set_ce(skb)) {
+ stats->ecn_mark++;
+ } else {
+@@ -320,9 +322,11 @@ static struct sk_buff *codel_dequeue(struct Qdisc *sch,
+ * assume that the drop rate that controlled the queue on the
+ * last cycle is a good starting point to control it now.
+ */
+- if (codel_time_before(now - vars->drop_next,
++ delta = vars->count - vars->lastcount;
++ if (delta > 1 &&
++ codel_time_before(now - vars->drop_next,
+ 16 * params->interval)) {
+- vars->count = (vars->count - vars->lastcount) | 1;
++ vars->count = delta;
+ /* we dont care if rec_inv_sqrt approximation
+ * is not very precise :
+ * Next Newton steps will correct it quadratically.
Modified: dists/sid/linux/debian/patches/series
==============================================================================
--- dists/sid/linux/debian/patches/series Wed Sep 26 22:59:39 2012 (r19402)
+++ dists/sid/linux/debian/patches/series Sat Sep 29 12:20:38 2012 (r19403)
@@ -271,6 +271,7 @@
features/all/codel/0005-net-codel-fix-build-errors.patch
features/all/codel/0006-codel-use-u16-field-instead-of-31bits-for-rec_inv_sq.patch
features/all/codel/0007-fq_codel-should-use-qdisc-backlog-as-threshold.patch
+features/all/codel/0008-codel-refine-one-condition-to-avoid-a-nul-rec_inv_sq.patch
# AppArmor userland compatibility. This had better be gone in wheezy+1!
features/all/AppArmor-compatibility-patch-for-v5-interface.patch
More information about the Kernel-svn-changes
mailing list