From: Michael Ellerman <mpe@ellerman.id.au>
To: Joakim Tjernlund <Joakim.Tjernlund@infinera.com>,
"linuxppc-dev\@ozlabs.org" <linuxppc-dev@ozlabs.org>
Subject: Re: Memory: 880608K/983040K .... 36896K reserved ?
Date: Thu, 02 Jul 2020 10:52:15 +1000 [thread overview]
Message-ID: <87tuyq7n7k.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <a598dcaea9e62379c74d1d78083d92898373c4de.camel@infinera.com>
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
prev parent reply other threads:[~2020-07-02 0:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-01 19:00 Memory: 880608K/983040K .... 36896K reserved ? Joakim Tjernlund
2020-07-02 0:52 ` Michael Ellerman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tuyq7n7k.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=Joakim.Tjernlund@infinera.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox