Score:1

18.04.6 LTS 5.4.0-132 kernel reserving 30GB memory

dz flag

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.

Doug Smythies avatar
gn flag
5.4.0-131 and 5.4.0-132 and others are very similar for me ~864000K reserved.
vidarlo avatar
om flag
In short: it doesn't - except for a few seconds during boot. What is the output of `free -h`on your system?
drovak avatar
dz flag
@vidarlo If you're asking me, I've listed the `free` usage above: 2.2G. Comparing more of the `dmesg` log, it seems like this has something to do with EFI memory allocation.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.