From: Alex Sidorenko <alexandre.sidorenko@hp.com>
To: John Heffner <jheffner@psc.edu>
Cc: netdev@vger.kernel.org
Subject: Re: SWS for rcvbuf < MTU
Date: Fri, 2 Mar 2007 15:29:05 -0500 [thread overview]
Message-ID: <200703021529.05902.alexandre.sidorenko@hp.com> (raw)
In-Reply-To: <45E872F5.2030102@psc.edu>
On March 2, 2007 01:54:45 pm John Heffner wrote:
> Alex Sidorenko wrote:
> [snip]
>
> > --- net/ipv4/tcp_output.c.orig Wed May 3 20:40:43 2006
> > +++ net/ipv4/tcp_output.c Tue Jan 30 14:24:56 2007
> > @@ -641,6 +641,7 @@
> > * Note, we don't "adjust" for TIMESTAMP or SACK option bytes.
> > * Regular options like TIMESTAMP are taken into account.
> > */
> > +static const char *SWS_id_string="@#SWS-fix-2";
> > u32 __tcp_select_window(struct sock *sk)
> > {
> > struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
> > @@ -682,6 +683,9 @@
> > window = tp->rcv_wnd;
> > if (window <= free_space - mss || window > free_space)
> > window = (free_space/mss)*mss;
> > + /* A fix for small rcvbuf asid@hp.com */
> > + else if (mss == full_space && window < full_space/2)
> > + window = full_space/2;
> >
> > return window;
> > }
>
> Good analysis of the problem, but the patch does not look quite right.
> In particular, you can't ever announce a zero window. :)
Hi John,
in case when (free_space < full_space/2) we do not reach the modified code and
we will return zero:
if (free_space < full_space/2) {
icsk->icsk_ack.quick = 0;
if (tcp_memory_pressure)
tp->rcv_ssthresh = min(tp->rcv_ssthresh, 4U*tp->advmss);
if (free_space < mss)
return 0;
}
Here is how windows look with the fixed kernel (from customer's test):
20:59:45.320758 Node1.logical.40171 > 11.0.0.1.39909: win = 708
20:59:45.322758 Node1.logical.40171 > 11.0.0.1.39909: win = 288
20:59:45.714567 Node1.logical.40171 > 11.0.0.1.39909: win = 354
20:59:45.717110 Node1.logical.40171 > 11.0.0.1.39909: win = 0
20:59:45.719110 Node1.logical.40171 > 11.0.0.1.39909: win = 708
...
Regards,
Alex
> I think this attached patch does the correct SWS avoidance.
>
> Thanks,
> -John
--
------------------------------------------------------------------
Alexandre Sidorenko email: alexs@hplinux.canada.hp.com
Global Solutions Engineering: Unix Networking
Hewlett-Packard (Canada)
------------------------------------------------------------------
next prev parent reply other threads:[~2007-03-02 20:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-02 16:28 SWS for rcvbuf < MTU Alex Sidorenko
2007-03-02 18:54 ` John Heffner
2007-03-02 20:29 ` Alex Sidorenko [this message]
2007-03-02 19:25 ` David Miller
2007-03-02 20:21 ` Alex Sidorenko
2007-03-02 20:33 ` David Miller
2007-03-02 21:16 ` John Heffner
2007-03-02 21:38 ` David Miller
2007-03-03 23:40 ` John Heffner
2007-03-05 16:52 ` Alex Sidorenko
2007-03-13 19:01 ` John Heffner
2007-03-14 16:18 ` Alex Sidorenko
2007-04-02 20:01 ` Alex Sidorenko
2007-04-02 20:21 ` David Miller
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=200703021529.05902.alexandre.sidorenko@hp.com \
--to=alexandre.sidorenko@hp.com \
--cc=jheffner@psc.edu \
--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;
as well as URLs for NNTP newsgroup(s).