* Memory: 880608K/983040K .... 36896K reserved ?
@ 2020-07-01 19:00 Joakim Tjernlund
2020-07-02 0:52 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Joakim Tjernlund @ 2020-07-01 19:00 UTC (permalink / raw)
To: linuxppc-dev@ozlabs.org
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 ...
Is there a way to tune(lower it) this memory?
Jocke
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Memory: 880608K/983040K .... 36896K reserved ?
2020-07-01 19:00 Memory: 880608K/983040K .... 36896K reserved ? Joakim Tjernlund
@ 2020-07-02 0:52 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2020-07-02 0:52 UTC (permalink / raw)
To: Joakim Tjernlund, linuxppc-dev@ozlabs.org
Joakim Tjernlund <Joakim.Tjernlund@infinera.com> 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
0: 0x0000000000000000..0x0000000002b40e57
1: 0x0000000002b41000..0x0000000002b413ff
2: 0x0000000002b50000..0x0000000002baffff
3: 0x000000000a910000..0x000000000e93ffff
4: 0x000000000fe80000..0x000000000fe9ffff
5: 0x000000000feac000..0x000000000ffebfff
6: 0x000000000ffed400..0x000000000ffed7ff
7: 0x000000000ffeda80..0x000000000ffeebff
8: 0x000000000ffeee80..0x000000000ffeffff
9: 0x000000000fff0280..0x000000000fff13ff
...
> 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.
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-02 0:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-01 19:00 Memory: 880608K/983040K .... 36896K reserved ? Joakim Tjernlund
2020-07-02 0:52 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox