I recently upgraded my kernel version from 5.4.0-131 to 5.4.0-132. I noticed some lagging behavior after this upgrade, and when I checked my memory usage with free -h
, it was reporting a total of 2.2G.
I looked with dmesg
to see what it would show regarding memory:
[ 0.277055] Memory: 2158340K/33356064K available (14339K kernel code, 2375K rwdata, 9460K rodata, 2740K init, 4988K bss, 31197724K reserved, 0K cma-reserved)
Why is the kernel reserving over 30GB of memory?
Comparing to 5.4.0-131, there's a big difference:
[ 0.290845] Memory: 32491976K/33356064K available (14339K kernel code, 2375K rwdata, 9448K rodata, 2740K init, 4988K bss, 864088K reserved, 0K cma-reserved)
I compared /proc/iomem
between kernel versions and saw no significant differences.
What else can I check to see why the kernel is reserving so much more with this later kernel version?
EDIT: I noticed this in dmesg
as well with the 132 kernel, which might point to an issue? The limit of -2 sounds rather off to me.
[ 0.015406] MEMBLOCK configuration:
[ 0.015407] memory size = 0x00000007f3e48000 reserved size = 0xffffffff4fff5e19
[ 0.015408] memory.cnt = 0x7
[ 0.015410] memory[0x0] [0x0000000000001000-0x000000000005bfff], 0x000000000005b000 bytes flags: 0x0
[ 0.015411] memory[0x1] [0x000000000005d000-0x000000000009ffff], 0x0000000000043000 bytes flags: 0x0
[ 0.015413] memory[0x2] [0x0000000000100000-0x00000000970f1fff], 0x0000000096ff2000 bytes flags: 0x0
[ 0.015414] memory[0x3] [0x00000000970f3000-0x0000000097903fff], 0x0000000000811000 bytes flags: 0x0
[ 0.015415] memory[0x4] [0x0000000097905000-0x00000000b66aafff], 0x000000001eda6000 bytes flags: 0x0
[ 0.015416] memory[0x5] [0x00000000b7c0f000-0x00000000b7c0ffff], 0x0000000000001000 bytes flags: 0x0
[ 0.015417] memory[0x6] [0x0000000100000000-0x000000083d7fffff], 0x000000073d800000 bytes flags: 0x0
[ 0.015418] reserved.cnt = 0x6
[ 0.015420] reserved[0x0] [0x0000000000000000-0x0000000000000fff], 0x0000000000001000 bytes flags: 0x0
[ 0.015421] reserved[0x1] [0x000000003a3e2000-0x000000003d08bfff], 0x0000000002caa000 bytes flags: 0x0
[ 0.015422] reserved[0x2] [0x00000000a09ef018-0x00000000a09efbb7], 0x0000000000000ba0 bytes flags: 0x0
[ 0.015423] reserved[0x3] [0x00000000a09f0018-0x00000000a0a00057], 0x0000000000010040 bytes flags: 0x0
[ 0.015425] reserved[0x4] [0x00000000a4f9d018-0x00000000a4fa5269], 0x0000000000008252 bytes flags: 0x0
[ 0.015426] reserved[0x5] [0x00000000b2cce018-0xfffffffffffffffe], 0xffffffff4d331fe7 bytes flags: 0x0
EDIT 2: I have uploaded both dmesg
outputs: 5.4.0-131 and 5.4.0-132 in hopes these will shed some further light on the situation.