Products > Computers

Linux, kernel 5.4, mysterious reserved ram

(1/2) > >>

DiTBho:
I am working with Kernel 5.4, profiled for a low memory system with only 32MB soldered ram and I  managed to turn off all the features that it doesn't need.

However, when the kernel boots ... it reserves 8Mbyte of ram, and it's not clear for what

--- Code: ---Memory: 32768K physical <--------------- 32MB
Memory: 24628K free  <------------------ only 24Mbyte available
Memory: 5913K kernel code
Memory: 193K rwdata
Memory: 1312K rodata
Memory: 184K init
Memory: 184K bss
Memory: 8140K reserved <---------------- reserved to what?!?
Memory: 0K cma-reserved

--- End code ---

There is no framebuffer. What is this reserved memory? How can it be reduced?  :-//

aix:
Is this related to /proc/sys/vm/min_free_kbytes?

https://linuxhint.com/vm_min_free_kbytes_sysctl/

magic:
Most likely by the firmware.

--- Code: ---[    0.000000] x86/fpu: x87 FPU will use FXSAVE
[    0.000000] e820: BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e6000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000dfe8ffff] usable
[    0.000000] BIOS-e820: [mem 0x00000000dfe90000-0x00000000dfe9dfff] ACPI data
[    0.000000] BIOS-e820: [mem 0x00000000dfe9e000-0x00000000dfedffff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x00000000dfee0000-0x00000000dfefffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fff00000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x0000000217ffffff] usable
[    0.000000] NX (Execute Disable) protection: active
--- End code ---

DiTBho:

--- Quote from: aix on July 30, 2021, 07:12:15 am ---Is this related to /proc/sys/vm/min_free_kbytes?

--- End quote ---


--- Code: ---#cat /proc/sys/vm/min_free_kbytes
627

--- End code ---

it doesn't seem so  :-//

SiliconWizard:
You'd probably have to configure (and compile yourself) the kernel to modify the amount of reserved memory. Apart from possible use by a GPU (which isn't your case here), it can also just be reserved memory for other device drivers.

You could have a look there: https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
I'm not familiar enough with this to help more than that though. But I would expect 8 MBytes to be a reasonable amout of reserved memory for a desktop computer these days, but certainly not for a small system with just 32 MBytes of RAM. So yeah, you may have to dig a little to figure out how to configure this.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod