Kernel crash when loading kernel module mlx5_core

There is one customer requirement to do network setup in crash kernel case.For this it requires loading of network drivers.

loadmods -s kmod-network 0x0200 || die "Failed to load network drivers."

Currently the memory allocated for crashkernel is 448M .

APPEND initrd=spu10.initrd rw crashkernel=256M-:448M nzenv=NPS_MODEL=@@NPS_MODEL@@#NPS_FAMILY=@@NPS_FAMILY@@#NPS_PLATFORM=@@NPS_PLATFORM@@#ISCSI_PROTO=@@ISCSI_PROTO@@ processor.max_cstate=0 console=ttyS0 printk.time=0 pci=nocrs mce=no_cmci nospectre_v2 nopti

So while loading these network drivers it is taking memory and we are getting OOM issue

LOADMOD: Loading kernel module mlx5_core
[   40.113336] (0000:06:00.0): E-Switch: Total vports 1, per vport: max uc(1024) max mc(16384)
[   40.229225] mlx5_core 0000:06:00.0: Port module event: module 0, Cable plugged
[   40.324671] mlx5_core 0000:06:00.1: firmware version: 14.27.1016
[   40.647911] modprobe invoked oom-killer: gfp_mask=0x200d2, order=0, oom_score_adj=0
[   40.739331] modprobe cpuset=/ mems_allowed=0
[   40.790280] CPU: 0 PID: 2996 Comm: modprobe Not tainted 3.10.0-862.14.4.el7_5.nps8_5.42.x86_64 #1
[   40.896223] Hardware name: OEM OEM System -[7X21CTO1WW]-/-[7X21CTO1WW]-, BIOS -[TEE180H-3.41]- 10/05/2022
[   41.010462] Call Trace:

I tried to increase the memory of crashkernel to more that 1G but still facing issue…
How can I avoid this OOM issue?

hi usha

You need enough memory for driver, the accurate number depend on your driver/NIC version and queue config.
Suggest at least 16GB memory for the system

Thank you
Meng, Shi