linux_dsm_epyc7002/drivers/net/ethernet
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
..
3com 3c59x: convert to generic DMA API 2018-05-13 20:22:58 -04:00
8390 net: 8390: ne: Fix accidentally removed RBTX4927 support 2018-05-16 14:38:54 -04:00
adaptec
aeroflex
agere
alacritech
allwinner
alteon
altera ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
amazon net: ena: Eliminate duplicate barriers on weakly-ordered archs 2018-03-26 12:47:56 -04:00
amd pcnet32: add an error handling path in pcnet32_probe_pci() 2018-05-22 15:40:15 -04:00
apm
apple net/macmace: Drop redundant MACH_IS_MAC test 2018-02-28 12:00:27 -05:00
aquantia net: aquantia: Limit number of vectors to actually allocated irqs 2018-05-08 00:06:44 -04:00
arc net: ethernet: arc: Fix a potential memory leak if an optional regulator is deferred 2018-03-20 12:06:23 -04:00
atheros
aurora
broadcom tg3: Fix vunmap() BUG_ON() triggered from tg3_free_consistent(). 2018-05-04 12:57:17 -04:00
brocade ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
cadence treewide: fix up files incorrectly marked executable 2018-04-07 13:31:23 -07:00
calxeda
cavium net: thunderx: rework mac addresses list to u64 array 2018-04-09 10:59:38 -04:00
chelsio cxgb4: fix offset in collecting TX rate limit info 2018-05-18 13:54:48 -04:00
cirrus net/mac89x0: Replace custom debug logging with netif_* calls 2018-03-01 21:21:36 -05:00
cisco enic: set DMA mask to 47 bit 2018-05-24 23:05:30 -04:00
cortina net: gemini: fix memory leak 2018-03-20 12:08:45 -04:00
davicom treewide: simplify Kconfig dependencies for removed archs 2018-03-26 15:55:57 +02:00
dec
dlink
emulex ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
ezchip
faraday
freescale net: fec: Add a SPDX identifier 2018-05-22 13:42:05 -04:00
fujitsu
hisilicon net: hns: Avoid action name truncation 2018-04-19 16:30:26 -04:00
hp
huawei
i825xx
ibm ibmvnic: Only do H_EOI for mobility events 2018-05-23 14:54:11 -04:00
intel ixgbe: fix memory leak on ipsec allocation 2018-05-11 12:22:22 -07:00
marvell net: mvpp2: Fix clock resource by adding missing mg_core_clk 2018-04-27 11:22:55 -04:00
mediatek
mellanox mlx4_core: allocate ICM memory in page size chunks 2018-05-25 10:22:53 -04:00
micrel
microchip lan743x: make functions lan743x_csr_read and lan743x_csr_read static 2018-03-12 11:12:38 -04:00
moxa
myricom ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
natsemi Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-23 11:31:58 -04:00
neterion
netronome Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf 2018-05-13 21:07:02 -04:00
ni net: nixge: Address compiler warnings about signedness 2018-05-07 23:30:03 -04:00
nuvoton
nvidia
nxp
oki-semi
packetengines
pasemi
qlogic qed: Fix mask for physical address in ILT entry 2018-05-22 15:32:55 -04:00
qualcomm net: qualcomm: rmnet: Fix warning seen with fill_info 2018-04-18 21:23:06 -04:00
rdc
realtek r8169: fix powering up RTL8168h 2018-05-08 22:54:18 -04:00
renesas sh_eth: Change platform check to CONFIG_ARCH_RENESAS 2018-05-18 13:45:48 -04:00
rocker
samsung ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
seeq
sfc sfc: fix ARFS expiry check on EF10 2018-04-27 20:21:07 -04:00
sgi
silan
sis
smsc arch: remove obsolete architecture ports 2018-04-02 20:20:12 -07:00
socionext net: ethernet: ave: add UniPhier PXs3 support 2018-03-26 11:29:10 -04:00
stmicro net: stmmac: Disable ACS Feature for GMAC >= 4 2018-04-19 13:33:44 -04:00
sun net: ethernet: sun: niu set correct packet size in skb 2018-05-04 13:20:46 -04:00
synopsys
tehuti
ti net: ethernet: ti: cpsw: fix packet leaking in dual_mac mode 2018-05-02 11:08:23 -04:00
toshiba
tundra
via
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c ethernet: Use octal not symbolic permissions 2018-03-26 12:07:49 -04:00
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
korina.c
lantiq_etop.c
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2018-04-03 14:04:18 -07:00
netx-eth.c