Joakim Tjernlund writes:
> I cannot figure out how the xxxK reserved item works in:
> Memory: 880608K/983040K available (9532K kernel code, 1104K rwdata, 3348K
> rodata, 1088K init, 1201K bss, 36896K reserved ...
It's calculated as:
(physpages - totalram_pages() - totalcma_pages)
The naming is a bit historical I guess.
But roughly physpages is the total number of pages of RAM we think exist
in the system.
totalram_pages() is the total number of pages that have been freed to
the buddy allocator.
totalcma_pages is pages used by CMA which is probably 0 for you.
So the amount "reserved" is the memory that hasn't been freed to the
buddy allocator by memblock.
You should be able to see it in debugfs:
# cat /sys/kernel/debug/memblock/reserved
> Is there a way to tune(lower it) this memory?
Some or most of those reserved regions will be things your firmware told
you to reserve, so you need to work out what each region is. They might
be firmware things, or even holes in RAM, you need to dig deeper to find
out what is what.