内核启动错误:vmap allocation for size 314576896 failed: use vmalloc= to increase size

逻辑部分加了一个PCIE-RC组件,启动时发现如下错误:

# insmod recorder_all_dongtai.ko
[  188.999787] recorder_all: loading out-of-tree module taints kernel.
[  189.007265] module loading...
[  189.779610] vmap allocation for size 314576896 failed: use vmalloc= to increase size
[  189.827439] alloc rcd buffer memory failed

从打印信息来看,是vmalloc 申请失败,原因是申请的空间太大了。
从逻辑组件的设备树可以看到,需要申请256M,而目前实际分配给vmalloc的只有200多M (通过 cat /proc/meminfo查看)。

修改办法:
   修改bootargs的vmalloc大小。(在设备树中修改)

   chosen {
bootargs = "console=ttyPS0,115200 root=/dev/ram rw earlyprintk vmalloc=400M";
linux,stdout-path = "/amba@0/serial@e0000000";
};

修改后,打印如下:
zynq> cat /proc/meminfo
MemTotal:         901364 kB
MemFree:          871852 kB
MemAvailable:     870244 kB
Buffers:             184 kB
Cached:             4696 kB
SwapCached:            0 kB
Active:             3036 kB
Inactive:           2516 kB
Active(anon):        672 kB
Inactive(anon):        0 kB
Active(file):       2364 kB
Inactive(file):     2516 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:        293888 kB
HighFree:         285408 kB
LowTotal:         607476 kB
LowFree:          586444 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:           672 kB
Mapped:             3268 kB
Shmem:                 0 kB
Slab:               3700 kB
SReclaimable:       1264 kB
SUnreclaim:         2436 kB
KernelStack:         320 kB
PageTables:          104 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:      450680 kB
Committed_AS:       1824 kB
VmallocTotal:     401408 kB
VmallocUsed:       19516 kB
VmallocChunk:     277500 kB
CmaTotal:          16384 kB
CmaFree:           16128 kB

你可能感兴趣的:(【kernel_memory】)