Determining the reason for reserved RAM
Mikhail Krylov
sqarert at gmail.com
Tue Jan 3 13:51:08 EST 2023
Hello,
I was doing some research figuring out what kernel reserves memory for,
and found myself in a sort of dead-end.
I found out that /proc/kpageflags bit 32 is set for reserved physical
pages in include/linux/kernel-page-flags.c, wrote a simple decoder of
that file, and on an old 32-bit x86 machine (it's the simplest there,
since it has less memory and fewest amount of memory holes) those are
reserved:
0x00000000-0x0000ffff - I assume those addresses are used for interrupt
vectors and whatnot
0x0009b000-0x000fffff - Video RAM/ROM for VGA/EGA/CGA and whatnot
0x01c00000-0x01c1ffff - no idea, it also has KPF_UNCACHED flag as well
0x1d000000-0x1dd73fff - Kernel code, rodata, rwdata, bss
0x35b4a000-0x36b55fff - no idea.
I also found out that region #5 is getting bigger or smaller depending
on the machine's memory size. On this 1.5G machine it's a bit more than
16M. On a 32G machine it's more than 500M size, feels a bit wasteful
IMO. So my question is, could you tell me where to look for what those
regions are and why those regions exist? I've checked /proc/iomem and
it doesn't say it is reserved or anything, just "System RAM".
Thanks in advance, Mikhail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20230103/17ce2c55/attachment.sig>
More information about the Kernelnewbies
mailing list