All of lore.kernel.org
 help / color / mirror / Atom feed
* net: more accurate skb truesize - regression on Microblaze
@ 2012-04-10  8:10 Michal Simek
  2012-04-10  8:27 ` Eric Dumazet
  0 siblings, 1 reply; 28+ messages in thread
From: Michal Simek @ 2012-04-10  8:10 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, John Williams, David Miller

Hi Eric,

I have spent some time to investigate what it is causing regression on our network bechmark
and I have identified that your patch "net: more accurate skb truesize" is causing that.

I see regression especially on incoming tcp (RX) connection which is 20%. On TX I see regression till 5%.

In general microblaze systems are pretty sensitive for memory usage and working with it.
Increasing packet sizes has big impact on performance.
I was surprised that regression is so high.

 From microblaze point of view is more important to remove that performance regression
than having more accurate memory accounting. 20% performance regression is simple so high
for that.
Isn't there any other way to doing better memory accounting?
Or is there any workaround which would be possible to use?

Thanks,
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  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:36   ` Michal Simek
  0 siblings, 2 replies; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10  8:27 UTC (permalink / raw)
  To: monstr; +Cc: netdev, John Williams, David Miller

On Tue, 2012-04-10 at 10:10 +0200, Michal Simek wrote:
> Hi Eric,
> 
> I have spent some time to investigate what it is causing regression on our network bechmark
> and I have identified that your patch "net: more accurate skb truesize" is causing that.
> 
> I see regression especially on incoming tcp (RX) connection which is 20%. On TX I see regression till 5%.
> 
> In general microblaze systems are pretty sensitive for memory usage and working with it.
> Increasing packet sizes has big impact on performance.
> I was surprised that regression is so high.
> 
>  From microblaze point of view is more important to remove that performance regression
> than having more accurate memory accounting. 20% performance regression is simple so high
> for that.
> Isn't there any other way to doing better memory accounting?
> Or is there any workaround which would be possible to use?
> 
> Thanks,
> Michal
> 

Hi Michal

We are currently working on the issue.

TCP stack was a bit optimistic in the ideal skb->len / skb->truesize
ratio that happened to 'mostly work' before my patch, but not anymore
after it.

memory accounting was wrong, we really wanted to be accurate, or risk
OOM and crashes.

Now we must fix tcp.

In the meantime you could try :

echo 1 >/proc/sys/net/ipv4/tcp_adv_win_scale

BTW, some NIC drivers are known to provide fat skb in their rx path, and
need to be fixed as well. (Some others just lie about skb->truesize to
avoid the tcp slowdown, see my previous iwlwifi patch)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  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:36   ` Michal Simek
  1 sibling, 1 reply; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10  8:32 UTC (permalink / raw)
  To: monstr; +Cc: netdev, John Williams, David Miller

On Tue, 2012-04-10 at 10:27 +0200, Eric Dumazet wrote:

> BTW, some NIC drivers are known to provide fat skb in their rx path, and
> need to be fixed as well. (Some others just lie about skb->truesize to
> avoid the tcp slowdown, see my previous iwlwifi patch)
> 
> 

What is the driver you currently use on your platform ?

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10  8:27 ` Eric Dumazet
  2012-04-10  8:32   ` Eric Dumazet
@ 2012-04-10  8:36   ` Michal Simek
  1 sibling, 0 replies; 28+ messages in thread
From: Michal Simek @ 2012-04-10  8:36 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, John Williams, David Miller

On 04/10/2012 10:27 AM, Eric Dumazet wrote:
> On Tue, 2012-04-10 at 10:10 +0200, Michal Simek wrote:
>> Hi Eric,
>>
>> I have spent some time to investigate what it is causing regression on our network bechmark
>> and I have identified that your patch "net: more accurate skb truesize" is causing that.
>>
>> I see regression especially on incoming tcp (RX) connection which is 20%. On TX I see regression till 5%.
>>
>> In general microblaze systems are pretty sensitive for memory usage and working with it.
>> Increasing packet sizes has big impact on performance.
>> I was surprised that regression is so high.
>>
>>   From microblaze point of view is more important to remove that performance regression
>> than having more accurate memory accounting. 20% performance regression is simple so high
>> for that.
>> Isn't there any other way to doing better memory accounting?
>> Or is there any workaround which would be possible to use?
>>
>> Thanks,
>> Michal
>>
>
> Hi Michal
>
> We are currently working on the issue.
>
> TCP stack was a bit optimistic in the ideal skb->len / skb->truesize
> ratio that happened to 'mostly work' before my patch, but not anymore
> after it.
>
> memory accounting was wrong, we really wanted to be accurate, or risk
> OOM and crashes.
>
> Now we must fix tcp.
>
> In the meantime you could try :
>
> echo 1>/proc/sys/net/ipv4/tcp_adv_win_scale

will retest it and let you know.

Thanks,
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10  8:32   ` Eric Dumazet
@ 2012-04-10  8:37     ` Michal Simek
  2012-04-10  8:45       ` Eric Dumazet
  2012-04-10 11:32       ` net: more accurate skb truesize - regression on Microblaze Eric Dumazet
  0 siblings, 2 replies; 28+ messages in thread
From: Michal Simek @ 2012-04-10  8:37 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, John Williams, David Miller

On 04/10/2012 10:32 AM, Eric Dumazet wrote:
> On Tue, 2012-04-10 at 10:27 +0200, Eric Dumazet wrote:
>
>> BTW, some NIC drivers are known to provide fat skb in their rx path, and
>> need to be fixed as well. (Some others just lie about skb->truesize to
>> avoid the tcp slowdown, see my previous iwlwifi patch)
>>
>>
>
> What is the driver you currently use on your platform ?

Using Xilinx ll_temac(in mainline) and axi_emac.


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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10  8:37     ` Michal Simek
@ 2012-04-10  8:45       ` Eric Dumazet
  2012-04-10  9:11         ` Michal Simek
  2012-04-10 11:32       ` net: more accurate skb truesize - regression on Microblaze Eric Dumazet
  1 sibling, 1 reply; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10  8:45 UTC (permalink / raw)
  To: monstr; +Cc: netdev, John Williams, David Miller

On Tue, 2012-04-10 at 10:37 +0200, Michal Simek wrote:
> On 04/10/2012 10:32 AM, Eric Dumazet wrote:
> > On Tue, 2012-04-10 at 10:27 +0200, Eric Dumazet wrote:
> >
> >> BTW, some NIC drivers are known to provide fat skb in their rx path, and
> >> need to be fixed as well. (Some others just lie about skb->truesize to
> >> avoid the tcp slowdown, see my previous iwlwifi patch)
> >>
> >>
> >
> > What is the driver you currently use on your platform ?
> 
> Using Xilinx ll_temac(in mainline) and axi_emac.
> 

OK thanks, could you please give us the content
of /proc/sys/net/ipv4/tcp_rmem ?

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10  8:45       ` Eric Dumazet
@ 2012-04-10  9:11         ` Michal Simek
  2012-04-10  9:24           ` Eric Dumazet
  0 siblings, 1 reply; 28+ messages in thread
From: Michal Simek @ 2012-04-10  9:11 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, John Williams, David Miller

On 04/10/2012 10:45 AM, Eric Dumazet wrote:
> On Tue, 2012-04-10 at 10:37 +0200, Michal Simek wrote:
>> On 04/10/2012 10:32 AM, Eric Dumazet wrote:
>>> On Tue, 2012-04-10 at 10:27 +0200, Eric Dumazet wrote:
>>>
>>>> BTW, some NIC drivers are known to provide fat skb in their rx path, and
>>>> need to be fixed as well. (Some others just lie about skb->truesize to
>>>> avoid the tcp slowdown, see my previous iwlwifi patch)
>>>>
>>>>
>>>
>>> What is the driver you currently use on your platform ?
>>
>> Using Xilinx ll_temac(in mainline) and axi_emac.
>>
>
> OK thanks, could you please give us the content
> of /proc/sys/net/ipv4/tcp_rmem ?

~ # cat /proc/sys/net/ipv4/tcp_rmem
4096    87380   130048


Let me know if you want to test anything.

Thanks,
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10  9:11         ` Michal Simek
@ 2012-04-10  9:24           ` Eric Dumazet
  2012-04-10  9:29             ` Michal Simek
  0 siblings, 1 reply; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10  9:24 UTC (permalink / raw)
  To: monstr; +Cc: netdev, John Williams, David Miller

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.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10  9:24           ` Eric Dumazet
@ 2012-04-10  9:29             ` Michal Simek
  2012-04-10  9:38               ` Eric Dumazet
  0 siblings, 1 reply; 28+ messages in thread
From: Michal Simek @ 2012-04-10  9:29 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, John Williams, David Miller

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

-- 
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10  9:29             ` Michal Simek
@ 2012-04-10  9:38               ` Eric Dumazet
  2012-04-10  9:50                 ` Michal Simek
                                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10  9:38 UTC (permalink / raw)
  To: monstr; +Cc: netdev, John Williams, David Miller

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);

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  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                 ` [PATCH] tcp: restore correct limit Eric Dumazet
  2 siblings, 0 replies; 28+ messages in thread
From: Michal Simek @ 2012-04-10  9:50 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, John Williams, David Miller

On 04/10/2012 11:38 AM, 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 ?

128MB memory and 4k page which is 32k pages.

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  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
  2012-04-10 10:03                 ` [PATCH] tcp: restore correct limit Eric Dumazet
  2 siblings, 1 reply; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10  9:52 UTC (permalink / raw)
  To: monstr; +Cc: netdev, John Williams, David Miller

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 :)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH] tcp: restore correct limit
  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                 ` Eric Dumazet
  2012-04-10 10:14                   ` Michal Simek
  2 siblings, 1 reply; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10 10:03 UTC (permalink / raw)
  To: monstr; +Cc: netdev, John Williams, David Miller, Jason Wang, Glauber Costa

Commit c43b874d5d714f (tcp: properly initialize tcp memory limits)
added a regression on machines with low amount of memory, since sockets
cant use 1/128 of memory but 1/1024

Fix this to match comment and previous behavior.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Glauber Costa <glommer@parallels.com>
---
 net/ipv4/tcp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5d54ed3..67d726e 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3302,7 +3302,7 @@ void __init tcp_init(void)
 
 	tcp_init_mem(&init_net);
 	/* Set per-socket limits to no more than 1/128 the pressure threshold */
-	limit = nr_free_buffer_pages() << (PAGE_SHIFT - 10);
+	limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7);
 	limit = max(limit, 128UL);
 	max_share = min(4UL*1024*1024, limit);
 

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10  9:52                 ` Eric Dumazet
@ 2012-04-10 10:03                   ` Michal Simek
  0 siblings, 0 replies; 28+ messages in thread
From: Michal Simek @ 2012-04-10 10:03 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, John Williams, David Miller

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH] tcp: restore correct limit
  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
  0 siblings, 1 reply; 28+ messages in thread
From: Michal Simek @ 2012-04-10 10:14 UTC (permalink / raw)
  To: Eric Dumazet
  Cc: netdev, John Williams, David Miller, Jason Wang, Glauber Costa

On 04/10/2012 12:03 PM, Eric Dumazet wrote:
> Commit c43b874d5d714f (tcp: properly initialize tcp memory limits)
> added a regression on machines with low amount of memory, since sockets
> cant use 1/128 of memory but 1/1024
>
> Fix this to match comment and previous behavior.
>
> Signed-off-by: Eric Dumazet<eric.dumazet@gmail.com>
> Cc: Jason Wang<jasowang@redhat.com>
> Cc: Glauber Costa<glommer@parallels.com>
> ---
>   net/ipv4/tcp.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 5d54ed3..67d726e 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -3302,7 +3302,7 @@ void __init tcp_init(void)
>
>   	tcp_init_mem(&init_net);
>   	/* Set per-socket limits to no more than 1/128 the pressure threshold */
> -	limit = nr_free_buffer_pages()<<  (PAGE_SHIFT - 10);
> +	limit = nr_free_buffer_pages()<<  (PAGE_SHIFT - 7);
>   	limit = max(limit, 128UL);
>   	max_share = min(4UL*1024*1024, limit);
>

hw design with csum is also much better.
Tested-by: Michal Simek <monstr@monstr.eu>

Thanks for help,
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH] tcp: restore correct limit
  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
  0 siblings, 2 replies; 28+ messages in thread
From: Jason Wang @ 2012-04-10 10:29 UTC (permalink / raw)
  To: monstr; +Cc: Eric Dumazet, netdev, John Williams, David Miller, Glauber Costa

On 04/10/2012 06:14 PM, Michal Simek wrote:
> On 04/10/2012 12:03 PM, Eric Dumazet wrote:
>> Commit c43b874d5d714f (tcp: properly initialize tcp memory limits)
>> added a regression on machines with low amount of memory, since sockets
>> cant use 1/128 of memory but 1/1024
>>
>> Fix this to match comment and previous behavior.
>>
>> Signed-off-by: Eric Dumazet<eric.dumazet@gmail.com>
>> Cc: Jason Wang<jasowang@redhat.com>
>> Cc: Glauber Costa<glommer@parallels.com>
>> ---
>>   net/ipv4/tcp.c |    2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
>> index 5d54ed3..67d726e 100644
>> --- a/net/ipv4/tcp.c
>> +++ b/net/ipv4/tcp.c
>> @@ -3302,7 +3302,7 @@ void __init tcp_init(void)
>>
>>       tcp_init_mem(&init_net);
>>       /* Set per-socket limits to no more than 1/128 the pressure 
>> threshold */
>> -    limit = nr_free_buffer_pages()<<  (PAGE_SHIFT - 10);
>> +    limit = nr_free_buffer_pages()<<  (PAGE_SHIFT - 7);
>>       limit = max(limit, 128UL);
>>       max_share = min(4UL*1024*1024, limit);
>>
>
> hw design with csum is also much better.
> Tested-by: Michal Simek <monstr@monstr.eu>
>
> Thanks for help,
> Michal
>
>
>
>
>
Hi Michal and Eric:

Which version of kernel did you test, did you try the newest kernel? The 
reason I use (PAGE_SHIFT - 10) is in the commit before 3dc43e3, the 
limit were calculated with:

     limit = nr_free_buffer_pages() / 8;
     limit = max(limit, 128UL);
...
     limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7);

So the rmem should be ok. But there's a defect (which I think does 
affect the regression) of my patch would could cause limit that we 
should shift after comparing with 128UL like:

     limit = nr_free_buffer_pages() / 8;
     limit = max(limit, 128UL) << (PAGE_SHIFT - 7);

Is anything I miss?

Thanks

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH] tcp: restore correct limit
  2012-04-10 10:29                     ` Jason Wang
@ 2012-04-10 10:32                       ` Michal Simek
  2012-04-10 10:40                       ` Eric Dumazet
  1 sibling, 0 replies; 28+ messages in thread
From: Michal Simek @ 2012-04-10 10:32 UTC (permalink / raw)
  To: Jason Wang
  Cc: Eric Dumazet, netdev, John Williams, David Miller, Glauber Costa

On 04/10/2012 12:29 PM, Jason Wang wrote:
> On 04/10/2012 06:14 PM, Michal Simek wrote:
>> On 04/10/2012 12:03 PM, Eric Dumazet wrote:
>>> Commit c43b874d5d714f (tcp: properly initialize tcp memory limits)
>>> added a regression on machines with low amount of memory, since sockets
>>> cant use 1/128 of memory but 1/1024
>>>
>>> Fix this to match comment and previous behavior.
>>>
>>> Signed-off-by: Eric Dumazet<eric.dumazet@gmail.com>
>>> Cc: Jason Wang<jasowang@redhat.com>
>>> Cc: Glauber Costa<glommer@parallels.com>
>>> ---
>>> net/ipv4/tcp.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
>>> index 5d54ed3..67d726e 100644
>>> --- a/net/ipv4/tcp.c
>>> +++ b/net/ipv4/tcp.c
>>> @@ -3302,7 +3302,7 @@ void __init tcp_init(void)
>>>
>>> tcp_init_mem(&init_net);
>>> /* Set per-socket limits to no more than 1/128 the pressure threshold */
>>> - limit = nr_free_buffer_pages()<< (PAGE_SHIFT - 10);
>>> + limit = nr_free_buffer_pages()<< (PAGE_SHIFT - 7);
>>> limit = max(limit, 128UL);
>>> max_share = min(4UL*1024*1024, limit);
>>>
>>
>> hw design with csum is also much better.
>> Tested-by: Michal Simek <monstr@monstr.eu>
>>
>> Thanks for help,
>> Michal
>>
>>
>>
>>
>>
> Hi Michal and Eric:
>
> Which version of kernel did you test, did you try the newest kernel? The reason I use (PAGE_SHIFT - 10) is in the commit before 3dc43e3, the limit were calculated with:

I have tested it on 3.4.0-rc2.

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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH] tcp: restore correct limit
  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
  1 sibling, 1 reply; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10 10:40 UTC (permalink / raw)
  To: Jason Wang; +Cc: monstr, netdev, John Williams, David Miller, Glauber Costa

On Tue, 2012-04-10 at 18:29 +0800, Jason Wang wrote:
> On 04/10/2012 06:14 PM, Michal Simek wrote:
> > On 04/10/2012 12:03 PM, Eric Dumazet wrote:
> >> Commit c43b874d5d714f (tcp: properly initialize tcp memory limits)
> >> added a regression on machines with low amount of memory, since sockets
> >> cant use 1/128 of memory but 1/1024
> >>
> >> Fix this to match comment and previous behavior.
> >>
> >> Signed-off-by: Eric Dumazet<eric.dumazet@gmail.com>
> >> Cc: Jason Wang<jasowang@redhat.com>
> >> Cc: Glauber Costa<glommer@parallels.com>
> >> ---
> >>   net/ipv4/tcp.c |    2 +-
> >>   1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> >> index 5d54ed3..67d726e 100644
> >> --- a/net/ipv4/tcp.c
> >> +++ b/net/ipv4/tcp.c
> >> @@ -3302,7 +3302,7 @@ void __init tcp_init(void)
> >>
> >>       tcp_init_mem(&init_net);
> >>       /* Set per-socket limits to no more than 1/128 the pressure 
> >> threshold */
> >> -    limit = nr_free_buffer_pages()<<  (PAGE_SHIFT - 10);
> >> +    limit = nr_free_buffer_pages()<<  (PAGE_SHIFT - 7);
> >>       limit = max(limit, 128UL);
> >>       max_share = min(4UL*1024*1024, limit);
> >>
> >
> > hw design with csum is also much better.
> > Tested-by: Michal Simek <monstr@monstr.eu>
> >
> > Thanks for help,
> > Michal
> >
> >
> >
> >
> >
> Hi Michal and Eric:
> 
> Which version of kernel did you test, did you try the newest kernel? The 
> reason I use (PAGE_SHIFT - 10) is in the commit before 3dc43e3, the 
> limit were calculated with:
> 
>      limit = nr_free_buffer_pages() / 8;
>      limit = max(limit, 128UL);
> ...
>      limit = ((unsigned long)sysctl_tcp_mem[1]) << (PAGE_SHIFT - 7);
> 
> So the rmem should be ok. But there's a defect (which I think does 
> affect the regression) of my patch would could cause limit that we 
> should shift after comparing with 128UL like:
> 
>      limit = nr_free_buffer_pages() / 8;
>      limit = max(limit, 128UL) << (PAGE_SHIFT - 7);
> 
> Is anything I miss?
> 

Yes, probably.

Maybe you should check what was the situation on 2.6 kernels.

Your commit did not completely fix the 4acb41903b2 one

I dont feel its necessary to put in the changelog the complete bug
history, since your commit does the needed tracking.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* [PATCH v2] tcp: restore correct limit
  2012-04-10 10:40                       ` Eric Dumazet
@ 2012-04-10 10:56                         ` Eric Dumazet
  2012-04-10 18:42                           ` David Miller
  0 siblings, 1 reply; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10 10:56 UTC (permalink / raw)
  To: Jason Wang; +Cc: monstr, netdev, John Williams, David Miller, Glauber Costa

Commit c43b874d5d714f (tcp: properly initialize tcp memory limits) tried
to fix a regression added in commits 4acb4190 & 3dc43e3,
but still get it wrong.

Result is machines with low amount of memory have too small tcp_rmem[2]
value and slow tcp receives : Per socket limit being 1/1024 of memory
instead of 1/128 in old kernels, so rcv window is capped to small
values.

Fix this to match comment and previous behavior.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Glauber Costa <glommer@parallels.com>
---
v2: remove one useless "limit = max(limit, 128UL);" line

 net/ipv4/tcp.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5d54ed3..7758a83 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3302,8 +3302,7 @@ void __init tcp_init(void)
 
 	tcp_init_mem(&init_net);
 	/* 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);
+	limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7);
 	max_share = min(4UL*1024*1024, limit);
 
 	sysctl_tcp_wmem[0] = SK_MEM_QUANTUM;

^ permalink raw reply related	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10  8:37     ` Michal Simek
  2012-04-10  8:45       ` Eric Dumazet
@ 2012-04-10 11:32       ` Eric Dumazet
  2012-04-10 11:38         ` Michal Simek
  1 sibling, 1 reply; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10 11:32 UTC (permalink / raw)
  To: monstr; +Cc: netdev, John Williams, David Miller

On Tue, 2012-04-10 at 10:37 +0200, Michal Simek wrote:
> On 04/10/2012 10:32 AM, Eric Dumazet wrote:
> > On Tue, 2012-04-10 at 10:27 +0200, Eric Dumazet wrote:
> >
> >> BTW, some NIC drivers are known to provide fat skb in their rx path, and
> >> need to be fixed as well. (Some others just lie about skb->truesize to
> >> avoid the tcp slowdown, see my previous iwlwifi patch)
> >>
> >>
> >
> > What is the driver you currently use on your platform ?
> 
> Using Xilinx ll_temac(in mainline) and axi_emac.
> 

ll_temac allocates XTE_MAX_JUMBO_FRAME_SIZE frames, even for MTU=1500 ?

Trying to allocate smaller packets would definitely help your tcp
receiver performance and overall reliability  (order-0 allocations
instead of order-2)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  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 13:43           ` David Miller
  0 siblings, 2 replies; 28+ messages in thread
From: Michal Simek @ 2012-04-10 11:38 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, John Williams, David Miller

On 04/10/2012 01:32 PM, Eric Dumazet wrote:
> On Tue, 2012-04-10 at 10:37 +0200, Michal Simek wrote:
>> On 04/10/2012 10:32 AM, Eric Dumazet wrote:
>>> On Tue, 2012-04-10 at 10:27 +0200, Eric Dumazet wrote:
>>>
>>>> BTW, some NIC drivers are known to provide fat skb in their rx path, and
>>>> need to be fixed as well. (Some others just lie about skb->truesize to
>>>> avoid the tcp slowdown, see my previous iwlwifi patch)
>>>>
>>>>
>>>
>>> What is the driver you currently use on your platform ?
>>
>> Using Xilinx ll_temac(in mainline) and axi_emac.
>>
>
> ll_temac allocates XTE_MAX_JUMBO_FRAME_SIZE frames, even for MTU=1500 ?

yes.

>
> Trying to allocate smaller packets would definitely help your tcp
> receiver performance and overall reliability  (order-0 allocations
> instead of order-2)

There is long history for ll_temac and axi emac drivers. and if you compare
them they are very similar with similar bugs.
In our distribution we are using older ll_temac driver where this is fixed.
Performance is much higher if you allocate buffers for actual mtu.

Thanks,
Michal

P.S.: Our plan is to start to use mainline drivers and fixing them to get
the same performance as we have with old one. It is one my todo list.


-- 
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  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
  1 sibling, 1 reply; 28+ messages in thread
From: Eric Dumazet @ 2012-04-10 11:50 UTC (permalink / raw)
  To: monstr; +Cc: netdev, John Williams, David Miller

On Tue, 2012-04-10 at 13:38 +0200, Michal Simek wrote:
> On 04/10/2012 01:32 PM, Eric Dumazet wrote:
> >
> > ll_temac allocates XTE_MAX_JUMBO_FRAME_SIZE frames, even for MTU=1500 ?
> 
> yes.
> 
> >
> > Trying to allocate smaller packets would definitely help your tcp
> > receiver performance and overall reliability  (order-0 allocations
> > instead of order-2)
> 
> There is long history for ll_temac and axi emac drivers. and if you compare
> them they are very similar with similar bugs.
> In our distribution we are using older ll_temac driver where this is fixed.
> Performance is much higher if you allocate buffers for actual mtu.
> 
> Thanks,
> Michal
> 
> P.S.: Our plan is to start to use mainline drivers and fixing them to get
> the same performance as we have with old one. It is one my todo list.

Ah good, because this 9000+pad versus 1500+pad allocation is way more
problematic than the (small) change on skb->truesize you bisected ;)

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10 11:50           ` Eric Dumazet
@ 2012-04-10 12:12             ` Michal Simek
  0 siblings, 0 replies; 28+ messages in thread
From: Michal Simek @ 2012-04-10 12:12 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: netdev, John Williams, David Miller

On 04/10/2012 01:50 PM, Eric Dumazet wrote:
> On Tue, 2012-04-10 at 13:38 +0200, Michal Simek wrote:
>> On 04/10/2012 01:32 PM, Eric Dumazet wrote:
>>>
>>> ll_temac allocates XTE_MAX_JUMBO_FRAME_SIZE frames, even for MTU=1500 ?
>>
>> yes.
>>
>>>
>>> Trying to allocate smaller packets would definitely help your tcp
>>> receiver performance and overall reliability  (order-0 allocations
>>> instead of order-2)
>>
>> There is long history for ll_temac and axi emac drivers. and if you compare
>> them they are very similar with similar bugs.
>> In our distribution we are using older ll_temac driver where this is fixed.
>> Performance is much higher if you allocate buffers for actual mtu.
>>
>> Thanks,
>> Michal
>>
>> P.S.: Our plan is to start to use mainline drivers and fixing them to get
>> the same performance as we have with old one. It is one my todo list.
>
> Ah good, because this 9000+pad versus 1500+pad allocation is way more
> problematic than the (small) change on skb->truesize you bisected ;)

yeah I know. Currently for me is the most important thing to have stable
driver which is ancient one and start to work on mainline to add there all features
and do more testing before we will add it to customers.

I have found it because I have compared the same driver with different kernel
versions and there was performance regression. Comparing with old one will show
different results. :-)

I will keep you in the loop when I start to fix mainline driver.

Thanks,
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10 11:38         ` Michal Simek
  2012-04-10 11:50           ` Eric Dumazet
@ 2012-04-10 13:43           ` David Miller
       [not found]             ` <CAHTX3dLRR09_QaA2BzmbCVAUVVGvr_P3s2d1KEgPLMYGGVzrpA@mail.gmail.com>
  1 sibling, 1 reply; 28+ messages in thread
From: David Miller @ 2012-04-10 13:43 UTC (permalink / raw)
  To: monstr; +Cc: eric.dumazet, netdev, john.williams

From: Michal Simek <monstr@monstr.eu>
Date: Tue, 10 Apr 2012 13:38:33 +0200

> There is long history for ll_temac and axi emac drivers. and if you
> compare
> them they are very similar with similar bugs.
> In our distribution we are using older ll_temac driver where this is
> fixed.
> Performance is much higher if you allocate buffers for actual mtu.

You place an enormous burdon upon us when you ask us to analyze your
performance problems and bugs when using out of tree drivers.  Please
do not do this.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
       [not found]             ` <CAHTX3dLRR09_QaA2BzmbCVAUVVGvr_P3s2d1KEgPLMYGGVzrpA@mail.gmail.com>
@ 2012-04-10 13:52               ` David Miller
       [not found]                 ` <CAHTX3dLz9+A48u6ckGiDytBkyMrvgV0Zi3xfnt4RBmoagJbndA@mail.gmail.com>
  0 siblings, 1 reply; 28+ messages in thread
From: David Miller @ 2012-04-10 13:52 UTC (permalink / raw)
  To: monstr; +Cc: eric.dumazet, netdev, john.williams

From: Michal Simek <monstr@monstr.eu>
Date: Tue, 10 Apr 2012 15:49:17 +0200

> I reported problem with performance regression on the same drvier
> between one kernel version and the newer version. Even with pointer
> to specific patch which I have identified as source of the problem.
> It has nothing to do with performance of driver itself because
> identified patch directly points to generic network code not to
> mainline driver and performance problem in it.

The size and attributes of the SKBs allocated is a clear important
variable in this bug, and you've just described how the SKBs allocated
are of completely different sizes in the driver you're using compared
to the one in the tree.

You were very fortunate that Eric was able to track down the cause
even with this unknown variable, but in other cases this can lead to
wild goose chases which waste developer time.

So, again, please do not do this in the future, reproduce your
problems with upstream sources only.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
       [not found]                 ` <CAHTX3dLz9+A48u6ckGiDytBkyMrvgV0Zi3xfnt4RBmoagJbndA@mail.gmail.com>
@ 2012-04-10 14:14                   ` David Miller
  2012-04-10 14:38                     ` Michal Simek
  0 siblings, 1 reply; 28+ messages in thread
From: David Miller @ 2012-04-10 14:14 UTC (permalink / raw)
  To: monstr; +Cc: eric.dumazet, netdev, john.williams

From: Michal Simek <monstr@monstr.eu>
Date: Tue, 10 Apr 2012 16:04:18 +0200

> I didn't report problem on any private held driver. I think you have
> misunderstand our later discussion about ll_temac driver where are
> some problems which at least

Thanks for the clarification.

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: net: more accurate skb truesize - regression on Microblaze
  2012-04-10 14:14                   ` David Miller
@ 2012-04-10 14:38                     ` Michal Simek
  0 siblings, 0 replies; 28+ messages in thread
From: Michal Simek @ 2012-04-10 14:38 UTC (permalink / raw)
  To: David Miller; +Cc: eric.dumazet, netdev, john.williams

On 04/10/2012 04:14 PM, David Miller wrote:
> From: Michal Simek<monstr@monstr.eu>
> Date: Tue, 10 Apr 2012 16:04:18 +0200
>
>> I didn't report problem on any private held driver. I think you have
>> misunderstand our later discussion about ll_temac driver where are
>> some problems which at least
>
> Thanks for the clarification.

No worries.

Thanks,
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

^ permalink raw reply	[flat|nested] 28+ messages in thread

* Re: [PATCH v2] tcp: restore correct limit
  2012-04-10 10:56                         ` [PATCH v2] " Eric Dumazet
@ 2012-04-10 18:42                           ` David Miller
  0 siblings, 0 replies; 28+ messages in thread
From: David Miller @ 2012-04-10 18:42 UTC (permalink / raw)
  To: eric.dumazet; +Cc: jasowang, monstr, netdev, john.williams, glommer

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 10 Apr 2012 12:56:42 +0200

> Commit c43b874d5d714f (tcp: properly initialize tcp memory limits) tried
> to fix a regression added in commits 4acb4190 & 3dc43e3,
> but still get it wrong.
> 
> Result is machines with low amount of memory have too small tcp_rmem[2]
> value and slow tcp receives : Per socket limit being 1/1024 of memory
> instead of 1/128 in old kernels, so rcv window is capped to small
> values.
> 
> Fix this to match comment and previous behavior.
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Jason Wang <jasowang@redhat.com>
> Cc: Glauber Costa <glommer@parallels.com>

Applied and queued up for -stable, thanks Eric.

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2012-04-10 18:42 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.