From: Michal Simek <monstr@monstr.eu>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org,
John Williams <john.williams@petalogix.com>,
David Miller <davem@davemloft.net>
Subject: Re: net: more accurate skb truesize - regression on Microblaze
Date: Tue, 10 Apr 2012 12:03:19 +0200 [thread overview]
Message-ID: <4F840567.6080208@monstr.eu> (raw)
In-Reply-To: <1334051536.3126.45.camel@edumazet-glaptop>
On 04/10/2012 11:52 AM, Eric Dumazet wrote:
> On Tue, 2012-04-10 at 11:38 +0200, Eric Dumazet wrote:
>> On Tue, 2012-04-10 at 11:29 +0200, Michal Simek wrote:
>>> On 04/10/2012 11:24 AM, Eric Dumazet wrote:
>>>> On Tue, 2012-04-10 at 11:11 +0200, Michal Simek wrote:
>>>>
>>>>> ~ # cat /proc/sys/net/ipv4/tcp_rmem
>>>>> 4096 87380 130048
>>>>
>>>> Are they default values, or tuned by admin ?
>>>>
>>>> 130048 bytes isnt enough to let TCP open its rcv window.
>>>
>>> yep. Default value after powerup. What's wrong with that?
>>>
>>> Michal
>>>
>>
>> I guess your tcp performance is driven by these numbers mostly.
>>
>> receive window wont grow above 64K in these case. a tcpdump could
>> confirm the issue.
>>
>> Do you have 130000 pages of memory ?
>>
>> Seems the net/ipv4/tcp.c code is wrong (or the comment is wrong)
>>
>> Since its not 1/128 but 1/1024 ....
>>
>>
>> /* Set per-socket limits to no more than 1/128 the pressure threshold */
>> limit = nr_free_buffer_pages()<< (PAGE_SHIFT - 10);
>> limit = max(limit, 128UL);
>> max_share = min(4UL*1024*1024, limit);
>>
>> sysctl_tcp_wmem[0] = SK_MEM_QUANTUM;
>> sysctl_tcp_wmem[1] = 16*1024;
>> sysctl_tcp_wmem[2] = max(64*1024, max_share);
>>
>> sysctl_tcp_rmem[0] = SK_MEM_QUANTUM;
>> sysctl_tcp_rmem[1] = 87380;
>> sysctl_tcp_rmem[2] = max(87380, max_share);
>>
>
> OK there is a bug introduced in commit
> c43b874d5d714f271b80d4c3f49e05d0cbf51ed2
> (tcp: properly initialize tcp memory limits)
>
> I'll send a patch to change :
>
> limit = nr_free_buffer_pages()<< (PAGE_SHIFT - 10);
>
> back to
>
> limit = nr_free_buffer_pages()<< (PAGE_SHIFT - 7);
>
>
> You could try this :)
sure.
~ # cat /proc/sys/net/ipv4/tcp_rmem
4096 87380 1040384
Regression is till 5% which is much better on hw design without csum support.
I will also test it with csum support and let you know.
Michal
--
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
next prev parent reply other threads:[~2012-04-10 10:03 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 8:10 net: more accurate skb truesize - regression on Microblaze Michal Simek
2012-04-10 8:27 ` Eric Dumazet
2012-04-10 8:32 ` Eric Dumazet
2012-04-10 8:37 ` Michal Simek
2012-04-10 8:45 ` Eric Dumazet
2012-04-10 9:11 ` Michal Simek
2012-04-10 9:24 ` Eric Dumazet
2012-04-10 9:29 ` Michal Simek
2012-04-10 9:38 ` Eric Dumazet
2012-04-10 9:50 ` Michal Simek
2012-04-10 9:52 ` Eric Dumazet
2012-04-10 10:03 ` Michal Simek [this message]
2012-04-10 10:03 ` [PATCH] tcp: restore correct limit Eric Dumazet
2012-04-10 10:14 ` Michal Simek
2012-04-10 10:29 ` Jason Wang
2012-04-10 10:32 ` Michal Simek
2012-04-10 10:40 ` Eric Dumazet
2012-04-10 10:56 ` [PATCH v2] " Eric Dumazet
2012-04-10 18:42 ` David Miller
2012-04-10 11:32 ` net: more accurate skb truesize - regression on Microblaze Eric Dumazet
2012-04-10 11:38 ` Michal Simek
2012-04-10 11:50 ` Eric Dumazet
2012-04-10 12:12 ` Michal Simek
2012-04-10 13:43 ` David Miller
[not found] ` <CAHTX3dLRR09_QaA2BzmbCVAUVVGvr_P3s2d1KEgPLMYGGVzrpA@mail.gmail.com>
2012-04-10 13:52 ` David Miller
[not found] ` <CAHTX3dLz9+A48u6ckGiDytBkyMrvgV0Zi3xfnt4RBmoagJbndA@mail.gmail.com>
2012-04-10 14:14 ` David Miller
2012-04-10 14:38 ` Michal Simek
2012-04-10 8:36 ` Michal Simek
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=4F840567.6080208@monstr.eu \
--to=monstr@monstr.eu \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=john.williams@petalogix.com \
--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).