Re: net: more accurate skb truesize - regression on Microblaze

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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?


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


~ # 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 Simek, Ing. (M.Eng)
w: p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux -
Microblaze U-BOOT custodian
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Linux Kernel Discussion]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux Bluetooth Networking]     [Linux Networking Users]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Photo]     [Singles Social Networking]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux Security]     [Linux IDE]     [Linux RAID]     [Linux SCSI]     [Free Dating]

Add to Google Powered by Linux