1
0
Fork 0
alistair23-linux/drivers/net
Qing Huang 1383cb8103 mlx4_core: allocate ICM memory in page size chunks
When a system is under memory presure (high usage with fragments),
the original 256KB ICM chunk allocations will likely trigger kernel
memory management to enter slow path doing memory compact/migration
ops in order to complete high order memory allocations.

When that happens, user processes calling uverb APIs may get stuck
for more than 120s easily even though there are a lot of free pages
in smaller chunks available in the system.

Syslog:
...
Dec 10 09:04:51 slcc03db02 kernel: [397078.572732] INFO: task
oracle_205573_e:205573 blocked for more than 120 seconds.
...

With 4KB ICM chunk size on x86_64 arch, the above issue is fixed.

However in order to support smaller ICM chunk size, we need to fix
another issue in large size kcalloc allocations.

E.g.
Setting log_num_mtt=30 requires 1G mtt entries. With the 4KB ICM chunk
size, each ICM chunk can only hold 512 mtt entries (8 bytes for each mtt
entry). So we need a 16MB allocation for a table->icm pointer array to
hold 2M pointers which can easily cause kcalloc to fail.

The solution is to use kvzalloc to replace kcalloc which will fall back
to vmalloc automatically if kmalloc fails.

Signed-off-by: Qing Huang <qing.huang@oracle.com>
Acked-by: Daniel Jurgens <danielj@mellanox.com>
Reviewed-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-05-25 10:22:53 -04:00
..
appletalk
arcnet
bonding bonding: send learning packets for vlans on slave 2018-05-11 11:50:41 -04:00
caif drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
can can: hi311x: Work around TX complete interrupt erratum 2018-05-10 18:25:30 +02:00
dsa net: dsa: bcm_sf2: Fix IPv6 rule half deletion 2018-05-16 14:11:22 -04:00
ethernet mlx4_core: allocate ICM memory in page size chunks 2018-05-25 10:22:53 -04:00
fddi
fjes
hamradio drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
hippi
hyperv hv_netvsc: set master device 2018-05-10 17:36:20 -04:00
ieee802154 net: ieee802154: mcr20a: do not leak resources on error path 2018-04-23 20:56:23 +02:00
ipvlan ipvlan: call netdevice notifier when master mac address changed 2018-05-16 11:59:41 -04:00
netdevsim devlink: convert occ_get op to separate registration 2018-04-08 12:45:57 -04:00
phy net: phy: broadcom: Fix bcm_write_exp() 2018-05-23 15:27:01 -04:00
plip
ppp ppp: remove the PPPIOCDETACH ioctl 2018-05-24 22:55:07 -04:00
slip slip: Check if rstate is initialized before uncompressing 2018-04-11 10:33:46 -04:00
team team: fix netconsole setup over team 2018-04-24 09:36:21 -04:00
usb qmi_wwan: do not steal interfaces from class drivers 2018-05-03 11:25:03 -04:00
vmxnet3 vmxnet3: use DMA memory barriers where required 2018-05-14 22:43:57 -04:00
wan hdlc_ppp: carrier detect ok, don't turn off negotiation 2018-02-26 14:38:12 -05:00
wimax net: drivers/net: Remove unnecessary skb_copy_expand OOM messages 2018-03-15 14:28:03 -04:00
wireless mac80211_hwsim: Fix radio dump for radio idx 0 2018-05-22 10:24:17 +02:00
xen-netback drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
Kconfig netdevsim: Add simple FIB resource controller via devlink 2018-03-29 14:10:31 -04:00
LICENSE.SRC
Makefile net: remove cris etrax ethernet driver 2018-03-26 15:56:24 +02:00
Space.c net/mac89x0: Convert to platform_driver 2018-03-01 21:21:36 -05:00
dummy.c net: Do not take net_rwsem in __rtnl_link_unregister() 2018-03-31 22:24:58 -04:00
eql.c
geneve.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
gtp.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
ifb.c net: Do not take net_rwsem in __rtnl_link_unregister() 2018-03-31 22:24:58 -04:00
loopback.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
macsec.c Revert "macsec: missing dev_put() on error in macsec_newlink()" 2018-04-16 10:01:12 -04:00
macvlan.c macvlan: filter out unsupported feature flags 2018-03-11 22:46:16 -04:00
macvtap.c
mdio.c
mii.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tuntap: correctly set SOCKWQ_ASYNC_NOSPACE 2018-05-23 14:32:12 -04:00
veth.c
virtio_net.c virtio-net: fix leaking page for gso packet during mergeable XDP 2018-05-23 13:36:19 -04:00
vrf.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-04-01 19:49:34 -04:00
vsockmon.c
vxlan.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
xen-netfront.c drivers/net: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00