1
0
Fork 0
alistair23-linux/drivers/net
Thadeu Lima de Souza Cascardo 117980c4c9 mlx4: allocate just enough pages instead of always 4 pages
The driver uses a 2-order allocation, which is too much on architectures
like ppc64, which has a 64KiB page. This particular allocation is used
for large packet fragments that may have a size of 512, 1024, 4096 or
fill the whole allocation. So, a minimum size of 16384 is good enough
and will be the same size that is used in architectures of 4KiB sized
pages.

This will avoid allocation failures that we see when the system is under
stress, but still has plenty of memory, like the one below.

This will also allow us to set the interface MTU to higher values like
9000, which was not possible on ppc64 without this patch.

Node 1 DMA: 737*64kB 37*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB = 51904kB
83137 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 10420096kB
Total swap = 10420096kB
107776 pages RAM
1184 pages reserved
147343 pages shared
28152 pages non-shared
netstat: page allocation failure. order:2, mode:0x4020
Call Trace:
[c0000001a4fa3770] [c000000000012f04] .show_stack+0x74/0x1c0 (unreliable)
[c0000001a4fa3820] [c00000000016af38] .__alloc_pages_nodemask+0x618/0x930
[c0000001a4fa39a0] [c0000000001a71a0] .alloc_pages_current+0xb0/0x170
[c0000001a4fa3a40] [d00000000dcc3e00] .mlx4_en_alloc_frag+0x200/0x240 [mlx4_en]
[c0000001a4fa3b10] [d00000000dcc3f8c] .mlx4_en_complete_rx_desc+0x14c/0x250 [mlx4_en]
[c0000001a4fa3be0] [d00000000dcc4eec] .mlx4_en_process_rx_cq+0x62c/0x850 [mlx4_en]
[c0000001a4fa3d20] [d00000000dcc5150] .mlx4_en_poll_rx_cq+0x40/0x90 [mlx4_en]
[c0000001a4fa3dc0] [c0000000004e2bb8] .net_rx_action+0x178/0x450
[c0000001a4fa3eb0] [c00000000009c9b8] .__do_softirq+0x118/0x290
[c0000001a4fa3f90] [c000000000031df8] .call_do_softirq+0x14/0x24
[c000000184c3b520] [c00000000000e700] .do_softirq+0xf0/0x110
[c000000184c3b5c0] [c00000000009c6d4] .irq_exit+0xb4/0xc0
[c000000184c3b640] [c00000000000e964] .do_IRQ+0x144/0x230

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Tested-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-04 20:34:29 -04:00
..
appletalk Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
arcnet Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
bonding net/bonding: correctly proxy slave neigh param setup ndo function 2012-04-04 18:11:12 -04:00
caif Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-09 14:34:20 -08:00
can Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
cris Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
dsa drivers/net: dsa/mv88e6xxx.c files need linux/module.h 2012-01-24 15:44:50 -05:00
ethernet mlx4: allocate just enough pages instead of always 4 pages 2012-04-04 20:34:29 -04:00
fddi
hamradio Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hippi Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
hyperv net/hyperv: Fix the code handling tx busy 2012-03-19 17:27:06 -04:00
irda Disintegrate and delete asm/system.h 2012-03-28 15:58:21 -07:00
phy phy:icplus:fix Auto Power Saving in ip101a_config_init. 2012-04-03 18:48:58 -04:00
plip Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ppp ppp: Don't stop and restart queue on every TX packet 2012-04-03 17:31:38 -04:00
slip Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
team net: use eth_hw_addr_random() and reset addr_assign_type 2012-02-15 15:34:17 -05:00
tokenring Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
usb net: usb: cdc_eem: fix mtu 2012-04-01 23:32:35 -04:00
vmxnet3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-05 21:16:26 -05:00
wan Documentation: remove references to /etc/modprobe.conf 2012-03-30 16:03:15 -07:00
wimax wimax: i2400m-usb - use a private struct ethtool_ops 2012-03-27 22:30:09 -04:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-02 17:53:39 -07:00
xen-netback drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
Kconfig
LICENSE.SRC
Makefile
Space.c CS89x0 : add platform driver support 2012-02-01 16:49:50 +01:00
dummy.c net: use eth_hw_addr_random() and reset addr_assign_type 2012-02-15 15:34:17 -05:00
eql.c eql: dont rely on HZ=100 2012-03-27 22:45:26 -04:00
ifb.c net: replace random_ether_addr() with eth_hw_addr_random() 2012-02-15 15:34:16 -05:00
loopback.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
macvlan.c net: use eth_hw_addr_random() and reset addr_assign_type 2012-02-15 15:34:17 -05:00
macvtap.c security: trim security.h 2012-02-14 10:45:42 +11:00
mdio.c ethtool, mdio, mii: Specify MDIO information fields in struct ethtool_cmd 2012-03-01 16:41:26 -05:00
mii.c ethtool, mdio, mii: Specify MDIO information fields in struct ethtool_cmd 2012-03-01 16:41:26 -05:00
netconsole.c drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
rionet.c rionet: fix page allocation order of rionet_active 2012-04-01 23:17:16 -04:00
sb1000.c
sungem_phy.c
tun.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
veth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-02-19 16:03:15 -05:00
virtio_net.c virtio_net: do not rate limit counter increments 2012-03-28 04:40:45 -04:00
xen-netfront.c One tiny feature that accidentally got lost in the initial git pull: 2012-03-24 12:20:25 -07:00