Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-22 Thread Angelo P. Castellani

Ok, I've missed this bit in the submitting patches documentation..
however sorry for that.

2007/2/22, David Miller <[EMAIL PROTECTED]>:

Please never submit patches like this, submit the infrastructure
FIRST, then submit the stuff that uses it.  When a sequence of patches
is applied, in sequence, the tree should build properly (even with all
available new options enabled) at each step along the way.

Otherwise we have the situation we have now, in that YeaH is in my
tree but doesn't build successfully.

What I'm going to do to "fix" this, is yank YeaH implementation out
of my tree, add this second patch first, then add the YeaH patch
back.

Please never do this again.


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-22 Thread David Miller
From: John Heffner <[EMAIL PROTECTED]>
Date: Thu, 22 Feb 2007 09:25:07 -0500

> My patch is meant as a replacement for YeAH patch 2/2, not meant to back 
> it out.  You do still need the second hunk below.  Sorry 'bout that.
> 
> If you're going to apply YeAH patch 2/2 first, you will also need to 
> remove the declaration of tcp_limited_slow_start() in include/net/tcp.h.

I noticed that after sending out my diff and corrected it before
pushing to tcp-2.6, thanks :-)
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-22 Thread John Heffner
My patch is meant as a replacement for YeAH patch 2/2, not meant to back 
it out.  You do still need the second hunk below.  Sorry 'bout that.


If you're going to apply YeAH patch 2/2 first, you will also need to 
remove the declaration of tcp_limited_slow_start() in include/net/tcp.h.


Thanks,
  -John


David Miller wrote:

From: David Miller <[EMAIL PROTECTED]>
Date: Thu, 22 Feb 2007 00:27:04 -0800 (PST)


I'll apply this, but could you please also when making suggestions
like this provide the patch necessary to kill the function added for
YeaH and the call site in the YeaH algorithm?


Here is how I'm resolving this:

diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 2b4142b..5ee79f3 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -310,29 +310,6 @@ void tcp_slow_start(struct tcp_sock *tp)
 }
 EXPORT_SYMBOL_GPL(tcp_slow_start);
 
-void tcp_limited_slow_start(struct tcp_sock *tp)

-{
-   /* RFC3742: limited slow start
-* the window is increased by 1/K MSS for each arriving ACK,
-* for K = int(cwnd/(0.5 max_ssthresh))
-*/
-
-   const int max_ssthresh = 100;
-
-   if (max_ssthresh > 0 && tp->snd_cwnd > max_ssthresh) {
-   u32 k = max(tp->snd_cwnd / (max_ssthresh >> 1), 1U);
-   if (++tp->snd_cwnd_cnt >= k) {
-   if (tp->snd_cwnd < tp->snd_cwnd_clamp)
-   tp->snd_cwnd++;
-   tp->snd_cwnd_cnt = 0;
-   }
-   } else {
-   if (tp->snd_cwnd < tp->snd_cwnd_clamp)
-   tp->snd_cwnd++;
-   }
-}
-EXPORT_SYMBOL_GPL(tcp_limited_slow_start);
-
 /*
  * TCP Reno congestion control
  * This is special case used for fallback as well.
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c
index 2d971d1..815e020 100644
--- a/net/ipv4/tcp_yeah.c
+++ b/net/ipv4/tcp_yeah.c
@@ -104,7 +104,7 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack,
return;
 
 	if (tp->snd_cwnd <= tp->snd_ssthresh) {

-   tcp_limited_slow_start(tp);
+   tcp_slow_start(tp);
} else if (!yeah->doing_reno_now) {
/* Scalable */
 
-

To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-22 Thread David Miller
From: David Miller <[EMAIL PROTECTED]>
Date: Thu, 22 Feb 2007 00:27:04 -0800 (PST)

> I'll apply this, but could you please also when making suggestions
> like this provide the patch necessary to kill the function added for
> YeaH and the call site in the YeaH algorithm?

Here is how I'm resolving this:

diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 2b4142b..5ee79f3 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -310,29 +310,6 @@ void tcp_slow_start(struct tcp_sock *tp)
 }
 EXPORT_SYMBOL_GPL(tcp_slow_start);
 
-void tcp_limited_slow_start(struct tcp_sock *tp)
-{
-   /* RFC3742: limited slow start
-* the window is increased by 1/K MSS for each arriving ACK,
-* for K = int(cwnd/(0.5 max_ssthresh))
-*/
-
-   const int max_ssthresh = 100;
-
-   if (max_ssthresh > 0 && tp->snd_cwnd > max_ssthresh) {
-   u32 k = max(tp->snd_cwnd / (max_ssthresh >> 1), 1U);
-   if (++tp->snd_cwnd_cnt >= k) {
-   if (tp->snd_cwnd < tp->snd_cwnd_clamp)
-   tp->snd_cwnd++;
-   tp->snd_cwnd_cnt = 0;
-   }
-   } else {
-   if (tp->snd_cwnd < tp->snd_cwnd_clamp)
-   tp->snd_cwnd++;
-   }
-}
-EXPORT_SYMBOL_GPL(tcp_limited_slow_start);
-
 /*
  * TCP Reno congestion control
  * This is special case used for fallback as well.
diff --git a/net/ipv4/tcp_yeah.c b/net/ipv4/tcp_yeah.c
index 2d971d1..815e020 100644
--- a/net/ipv4/tcp_yeah.c
+++ b/net/ipv4/tcp_yeah.c
@@ -104,7 +104,7 @@ static void tcp_yeah_cong_avoid(struct sock *sk, u32 ack,
return;
 
if (tp->snd_cwnd <= tp->snd_ssthresh) {
-   tcp_limited_slow_start(tp);
+   tcp_slow_start(tp);
} else if (!yeah->doing_reno_now) {
/* Scalable */
 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-22 Thread David Miller
From: John Heffner <[EMAIL PROTECTED]>
Date: Mon, 19 Feb 2007 16:00:06 -0500

> I'd prefer to make it apply automatically across all congestion controls 
> that do slow-start, and also make the max_ssthresh parameter 
> controllable via sysctl.  This patch (attached) should implement this. 
> Note the default value for sysctl_tcp_max_ssthresh = 0, which disables 
> limited slow-start.  This should make ABC apply during LSS as well.
> 
> Note the patch is compile-tested only!  I can do some real testing if 
> you'd like to apply this Dave.

I'll apply this, but could you please also when making suggestions
like this provide the patch necessary to kill the function added for
YeaH and the call site in the YeaH algorithm?

When people post conflicting code bits for this for inclusion, it
makes work very difficult for me.

What I want to do right now is back everything out and let you guys
sort it out, but I don't want to do that because it would mean that
I just wasted an entire hour reviewing the YeaH patches. :-/

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-22 Thread David Miller
From: "Angelo P. Castellani" <[EMAIL PROTECTED]>
Date: Mon, 19 Feb 2007 11:35:09 +0100

> From: Angelo P. Castellani <[EMAIL PROTECTED]>
> 
> RFC3742: limited slow start
> 
> See http://www.ietf.org/rfc/rfc3742.txt
> 
> Signed-off-by: Angelo P. Castellani <[EMAIL PROTECTED]>
> ---
> 
> To allow code reutilization I've added the limited slow start procedure 
> as an exported symbol of linux tcp congestion control.
> 
> On large BDP networks canonical slow start should be avoided because it 
> requires large packet losses to converge, whereas at lower BDPs slow 
> start and limited slow start are identical. Large BDP is defined through 
> the max_ssthresh variable.
> 
> I think limited slow start could safely replace the canonical slow start 
> procedure in Linux.
 ...
> p.s.: in the attached patch is added an exported function currently used 
> only by YeAH TCP

Please never submit patches like this, submit the infrastructure
FIRST, then submit the stuff that uses it.  When a sequence of patches
is applied, in sequence, the tree should build properly (even with all
available new options enabled) at each step along the way.

Otherwise we have the situation we have now, in that YeaH is in my
tree but doesn't build successfully.

What I'm going to do to "fix" this, is yank YeaH implementation out
of my tree, add this second patch first, then add the YeaH patch
back.

Please never do this again.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-20 Thread Angelo P. Castellani

John Heffner ha scritto:
Sorry for the confusion.  The patch I attached to my message was 
compile-tested only.
Well I've read your reply by night and I haven't seen that you attached 
a patch. Sorry for that.


Kind regards,
Angelo
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-19 Thread John Heffner

Angelo P. Castellani wrote:

John Heffner ha scritto:
Note the patch is compile-tested only!  I can do some real testing if 
you'd like to apply this Dave.
The date you read on the patch is due to the fact I've splitted this 
patchset into 2 diff files. This isn't compile-tested only, I've used 
this piece of code for about 3 months.


Sorry for the confusion.  The patch I attached to my message was 
compile-tested only.


Thanks,
  -John
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-19 Thread Angelo P. Castellani

John Heffner ha scritto:
Note the patch is compile-tested only!  I can do some real testing if 
you'd like to apply this Dave.
The date you read on the patch is due to the fact I've splitted this 
patchset into 2 diff files. This isn't compile-tested only, I've used 
this piece of code for about 3 months.


However more testing is good and welcome.

Regards,
Angelo P. Castellani
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-19 Thread John Heffner
I'd prefer to make it apply automatically across all congestion controls 
that do slow-start, and also make the max_ssthresh parameter 
controllable via sysctl.  This patch (attached) should implement this. 
Note the default value for sysctl_tcp_max_ssthresh = 0, which disables 
limited slow-start.  This should make ABC apply during LSS as well.


Note the patch is compile-tested only!  I can do some real testing if 
you'd like to apply this Dave.


Thanks,
  -John


Angelo P. Castellani wrote:

Forgot the patch..

Angelo P. Castellani ha scritto:

From: Angelo P. Castellani <[EMAIL PROTECTED]>

RFC3742: limited slow start

See http://www.ietf.org/rfc/rfc3742.txt

Signed-off-by: Angelo P. Castellani <[EMAIL PROTECTED]>
---

To allow code reutilization I've added the limited slow start 
procedure as an exported symbol of linux tcp congestion control.


On large BDP networks canonical slow start should be avoided because 
it requires large packet losses to converge, whereas at lower BDPs 
slow start and limited slow start are identical. Large BDP is defined 
through the max_ssthresh variable.


I think limited slow start could safely replace the canonical slow 
start procedure in Linux.


Regards,
Angelo P. Castellani

p.s.: in the attached patch is added an exported function currently 
used only by YeAH TCP


include/net/tcp.h   |1 +
net/ipv4/tcp_cong.c |   23 +++
2 files changed, 24 insertions(+)







diff -uprN linux-2.6.20-a/include/net/tcp.h linux-2.6.20-c/include/net/tcp.h
--- linux-2.6.20-a/include/net/tcp.h2007-02-04 19:44:54.0 +0100
+++ linux-2.6.20-c/include/net/tcp.h2007-02-19 10:54:10.0 +0100
@@ -669,6 +669,7 @@ extern void tcp_get_allowed_congestion_c
 extern int tcp_set_allowed_congestion_control(char *allowed);
 extern int tcp_set_congestion_control(struct sock *sk, const char *name);
 extern void tcp_slow_start(struct tcp_sock *tp);
+extern void tcp_limited_slow_start(struct tcp_sock *tp);
 
 extern struct tcp_congestion_ops tcp_init_congestion_ops;

 extern u32 tcp_reno_ssthresh(struct sock *sk);
diff -uprN linux-2.6.20-a/net/ipv4/tcp_cong.c linux-2.6.20-c/net/ipv4/tcp_cong.c
--- linux-2.6.20-a/net/ipv4/tcp_cong.c  2007-02-04 19:44:54.0 +0100
+++ linux-2.6.20-c/net/ipv4/tcp_cong.c  2007-02-19 10:54:10.0 +0100
@@ -297,6 +297,29 @@ void tcp_slow_start(struct tcp_sock *tp)
 }
 EXPORT_SYMBOL_GPL(tcp_slow_start);
 
+void tcp_limited_slow_start(struct tcp_sock *tp)

+{
+   /* RFC3742: limited slow start
+* the window is increased by 1/K MSS for each arriving ACK,
+* for K = int(cwnd/(0.5 max_ssthresh))
+*/
+
+   const int max_ssthresh = 100;
+
+   if (max_ssthresh > 0 && tp->snd_cwnd > max_ssthresh) {
+   u32 k = max(tp->snd_cwnd / (max_ssthresh >> 1), 1U);
+   if (++tp->snd_cwnd_cnt >= k) {
+   if (tp->snd_cwnd < tp->snd_cwnd_clamp)
+   tp->snd_cwnd++;
+   tp->snd_cwnd_cnt = 0;
+   }
+   } else {
+   if (tp->snd_cwnd < tp->snd_cwnd_clamp)
+   tp->snd_cwnd++;
+   }
+}
+EXPORT_SYMBOL_GPL(tcp_limited_slow_start);
+
 /*
  * TCP Reno congestion control
  * This is special case used for fallback as well.


Add RFC3742 Limited Slow-Start, controlled by variable sysctl_tcp_max_ssthresh.

Signed-off-by: John Heffner <[EMAIL PROTECTED]>

---
commit 97033fa201705e6cfc68ce66f34ede3277c3d645
tree 5df4607728abce93aa05b31015a90f2ce369abff
parent 8a03d9a498eaf02c8a118752050a5154852c13bf
author John Heffner <[EMAIL PROTECTED]> Mon, 19 Feb 2007 15:52:16 -0500
committer John Heffner <[EMAIL PROTECTED]> Mon, 19 Feb 2007 15:52:16 -0500

 include/linux/sysctl.h |1 +
 include/net/tcp.h  |1 +
 net/ipv4/sysctl_net_ipv4.c |8 
 net/ipv4/tcp_cong.c|   33 +++--
 4 files changed, 33 insertions(+), 10 deletions(-)

diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 2c5fb38..a2dce72 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -438,6 +438,7 @@ enum
NET_CIPSOV4_RBM_STRICTVALID=121,
NET_TCP_AVAIL_CONG_CONTROL=122,
NET_TCP_ALLOWED_CONG_CONTROL=123,
+   NET_TCP_MAX_SSTHRESH=124,
 };
 
 enum {
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 5c472f2..521da28 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -230,6 +230,7 @@ extern int sysctl_tcp_mtu_probing;
 extern int sysctl_tcp_base_mss;
 extern int sysctl_tcp_workaround_signed_windows;
 extern int sysctl_tcp_slow_start_after_idle;
+extern int sysctl_tcp_max_ssthresh;
 
 extern atomic_t tcp_memory_allocated;
 extern atomic_t tcp_sockets_allocated;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 0aa3047..d68effe 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -803,6 

Re: [PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-19 Thread Angelo P. Castellani

Forgot the patch..

Angelo P. Castellani ha scritto:

From: Angelo P. Castellani <[EMAIL PROTECTED]>

RFC3742: limited slow start

See http://www.ietf.org/rfc/rfc3742.txt

Signed-off-by: Angelo P. Castellani <[EMAIL PROTECTED]>
---

To allow code reutilization I've added the limited slow start 
procedure as an exported symbol of linux tcp congestion control.


On large BDP networks canonical slow start should be avoided because 
it requires large packet losses to converge, whereas at lower BDPs 
slow start and limited slow start are identical. Large BDP is defined 
through the max_ssthresh variable.


I think limited slow start could safely replace the canonical slow 
start procedure in Linux.


Regards,
Angelo P. Castellani

p.s.: in the attached patch is added an exported function currently 
used only by YeAH TCP


include/net/tcp.h   |1 +
net/ipv4/tcp_cong.c |   23 +++
2 files changed, 24 insertions(+)




diff -uprN linux-2.6.20-a/include/net/tcp.h linux-2.6.20-c/include/net/tcp.h
--- linux-2.6.20-a/include/net/tcp.h	2007-02-04 19:44:54.0 +0100
+++ linux-2.6.20-c/include/net/tcp.h	2007-02-19 10:54:10.0 +0100
@@ -669,6 +669,7 @@ extern void tcp_get_allowed_congestion_c
 extern int tcp_set_allowed_congestion_control(char *allowed);
 extern int tcp_set_congestion_control(struct sock *sk, const char *name);
 extern void tcp_slow_start(struct tcp_sock *tp);
+extern void tcp_limited_slow_start(struct tcp_sock *tp);
 
 extern struct tcp_congestion_ops tcp_init_congestion_ops;
 extern u32 tcp_reno_ssthresh(struct sock *sk);
diff -uprN linux-2.6.20-a/net/ipv4/tcp_cong.c linux-2.6.20-c/net/ipv4/tcp_cong.c
--- linux-2.6.20-a/net/ipv4/tcp_cong.c	2007-02-04 19:44:54.0 +0100
+++ linux-2.6.20-c/net/ipv4/tcp_cong.c	2007-02-19 10:54:10.0 +0100
@@ -297,6 +297,29 @@ void tcp_slow_start(struct tcp_sock *tp)
 }
 EXPORT_SYMBOL_GPL(tcp_slow_start);
 
+void tcp_limited_slow_start(struct tcp_sock *tp)
+{
+	/* RFC3742: limited slow start
+	 * the window is increased by 1/K MSS for each arriving ACK,
+	 * for K = int(cwnd/(0.5 max_ssthresh))
+	 */
+
+	const int max_ssthresh = 100;
+
+	if (max_ssthresh > 0 && tp->snd_cwnd > max_ssthresh) {
+		u32 k = max(tp->snd_cwnd / (max_ssthresh >> 1), 1U);
+		if (++tp->snd_cwnd_cnt >= k) {
+			if (tp->snd_cwnd < tp->snd_cwnd_clamp)
+tp->snd_cwnd++;
+			tp->snd_cwnd_cnt = 0;
+		}
+	} else {
+		if (tp->snd_cwnd < tp->snd_cwnd_clamp)
+			tp->snd_cwnd++;
+	}
+}
+EXPORT_SYMBOL_GPL(tcp_limited_slow_start);
+
 /*
  * TCP Reno congestion control
  * This is special case used for fallback as well.


[PATCH 2/2][TCP] YeAH-TCP: limited slow start exported function

2007-02-19 Thread Angelo P. Castellani

From: Angelo P. Castellani <[EMAIL PROTECTED]>

RFC3742: limited slow start

See http://www.ietf.org/rfc/rfc3742.txt

Signed-off-by: Angelo P. Castellani <[EMAIL PROTECTED]>
---

To allow code reutilization I've added the limited slow start procedure 
as an exported symbol of linux tcp congestion control.


On large BDP networks canonical slow start should be avoided because it 
requires large packet losses to converge, whereas at lower BDPs slow 
start and limited slow start are identical. Large BDP is defined through 
the max_ssthresh variable.


I think limited slow start could safely replace the canonical slow start 
procedure in Linux.


Regards,
Angelo P. Castellani

p.s.: in the attached patch is added an exported function currently used 
only by YeAH TCP


include/net/tcp.h   |1 +
net/ipv4/tcp_cong.c |   23 +++
2 files changed, 24 insertions(+)

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC] TCP limited slow start

2006-06-05 Thread Stephen Hemminger
On Sat, 03 Jun 2006 12:46:57 -0400
John Heffner <[EMAIL PROTECTED]> wrote:

> Stephen Hemminger wrote:
> > Rolled my sleeve's up and gave this a try...
> > 
> > This is a implementation of Sally Floyd's Limited Slow Start
> > for Large Congestion Windows.
> 
> Limited slow start is useful as a work-around for bottleneck queues that 
> are inappropriately short.  I don't think it's good to run it all the 
> time by default (with a max_ssthresh < infinity), because it slows down 
> flows on healthy paths, and introduces another non-scalable parameter to 
> TCP.
> 
> I see it as potentially useful as a per-route parameter, where you set 
> it deliberately to work around some known problematic path.  A sysctl 
> with a default value of infinity might be okay as well.
> 
> Practically speaking, we've had this in the Web100 patch for a long time 
> (and still do, look for WAD_MaxSsthresh), but I've never found it all 
> that useful.  If the bottleneck queue is too short, you usually end up 
> getting screwed other ways too.
> 
>-John

I moved it off to tcp_highspeed.c only. That is seems appropriate because
that is where you put the related RFC.
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RFC] TCP limited slow start

2006-06-03 Thread John Heffner

Stephen Hemminger wrote:

Rolled my sleeve's up and gave this a try...

This is a implementation of Sally Floyd's Limited Slow Start
for Large Congestion Windows.


Limited slow start is useful as a work-around for bottleneck queues that 
are inappropriately short.  I don't think it's good to run it all the 
time by default (with a max_ssthresh < infinity), because it slows down 
flows on healthy paths, and introduces another non-scalable parameter to 
TCP.


I see it as potentially useful as a per-route parameter, where you set 
it deliberately to work around some known problematic path.  A sysctl 
with a default value of infinity might be okay as well.


Practically speaking, we've had this in the Web100 patch for a long time 
(and still do, look for WAD_MaxSsthresh), but I've never found it all 
that useful.  If the bottleneck queue is too short, you usually end up 
getting screwed other ways too.


  -John
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC] TCP limited slow start

2006-06-02 Thread Stephen Hemminger
Rolled my sleeve's up and gave this a try...

This is a implementation of Sally Floyd's Limited Slow Start
for Large Congestion Windows.

Summary from RFC:
   Limited Slow-Start introduces a parameter, "max_ssthresh", and
   modifies the slow-start mechanism for values of the congestion window
   where "cwnd" is greater than "max_ssthresh".  That is, during Slow-
   Start, when

  cwnd <= max_ssthresh,

   cwnd is increased by one MSS (MAXIMUM SEGMENT SIZE) for every
   arriving ACK (acknowledgement) during slow-start, as is always the
   case.  During Limited Slow-Start, when

  max_ssthresh < cwnd <= ssthresh,

   the invariant is maintained so that the congestion window is
   increased during slow-start by at most max_ssthresh/2 MSS per round-
   trip time.  This is done as follows:

  For each arriving ACK in slow-start:
If (cwnd <= max_ssthresh)
   cwnd += MSS;
else
   K = int(cwnd/(0.5 max_ssthresh));
   cwnd += int(MSS/K);

   Thus, during Limited Slow-Start the window is increased by 1/K MSS
   for each arriving ACK, for K = int(cwnd/(0.5 max_ssthresh)), instead
   of by 1 MSS as in standard slow-start [RFC2581].

---

 Documentation/networking/ip-sysctl.txt |8 +-
 include/linux/sysctl.h |1 +
 include/net/tcp.h  |1 +
 net/ipv4/sysctl_net_ipv4.c |8 ++
 net/ipv4/tcp_cong.c|   46 
 net/ipv4/tcp_input.c   |1 +
 6 files changed, 47 insertions(+), 18 deletions(-)

0884f45c9f21c50dd9117b2fc02bf5436be3c3bf
diff --git a/Documentation/networking/ip-sysctl.txt 
b/Documentation/networking/ip-sysctl.txt
index f12007b..9869298 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -103,9 +103,15 @@ TCP variables: 
 
 tcp_abc - INTEGER
Controls Appropriate Byte Count defined in RFC3465. If set to
-   0 then does congestion avoid once per ack. 1 is conservative
+   0 then does congestion avoid once per ack. 1 (default) is conservative
value, and 2 is more agressive.
 
+tcp_limited_ssthresh - INTEGER
+   Controls the increase of the congestion window during slow start as
+   defined in RFC3742. The purpose is to slow the growth of the congestion
+   window on high delay networks where agressive growth can cause losses
+   of 1000's of packets. Default is 100 packets.
+
 tcp_syn_retries - INTEGER
Number of times initial SYNs for an active TCP connection attempt
will be retransmitted. Should not be higher than 255. Default value
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 76eaeff..a455165 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -403,6 +403,7 @@ enum
NET_TCP_MTU_PROBING=113,
NET_TCP_BASE_MSS=114,
NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=115,
+   NET_TCP_LIMITED_SSTHRESH=116,
 };
 
 enum {
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 575636f..3a14861 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -225,6 +225,7 @@ extern int sysctl_tcp_abc;
 extern int sysctl_tcp_mtu_probing;
 extern int sysctl_tcp_base_mss;
 extern int sysctl_tcp_workaround_signed_windows;
+extern int sysctl_tcp_limited_ssthresh;
 
 extern atomic_t tcp_memory_allocated;
 extern atomic_t tcp_sockets_allocated;
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index 6b6c3ad..d1358d3 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -688,6 +688,14 @@ #endif
.mode   = 0644,
.proc_handler   = &proc_dointvec
},
+   {
+   .ctl_name   = NET_TCP_LIMITED_SSTHRESH,
+   .procname   = "tcp_max_ssthresh",
+   .data   = &sysctl_tcp_limited_ssthresh,
+   .maxlen = sizeof(int),
+   .mode   = 0644,
+   .proc_handler   = &proc_dointvec,
+   },
{ .ctl_name = 0 }
 };
 
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 857eefc..a27c792 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -180,25 +180,37 @@ int tcp_set_congestion_control(struct so
  */
 void tcp_slow_start(struct tcp_sock *tp)
 {
-   if (sysctl_tcp_abc) {
-   /* RFC3465: Slow Start
-* TCP sender SHOULD increase cwnd by the number of
-* previously unacknowledged bytes ACKed by each incoming
-* acknowledgment, provided the increase is not more than L
-*/
-   if (tp->bytes_acked < tp->mss_cache)
-   return;
-
-   /* We MAY increase by 2 if discovered delayed ack */
-   if (sysctl_tcp_abc > 1 && tp->bytes_acked > 2*tp->mss_cache) {
-   if (tp->snd_cwnd < tp->snd_cwnd_clamp)
-   tp->snd_cwnd++;
-   }
+ 

TCP Limited slow start

2006-06-02 Thread Stephen Hemminger
Has anyone done an implementation of RFC3742 for Linux? It looks interesting, 
but
would need some integration with current ABC code.

There was some evidence of a version in old Web100 code, but it's gone now. Was
it deemed a mistake?
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html