Commit f49ca13e authored by Bhupesh Sharma's avatar Bhupesh Sharma Committed by Masaki Tachibana
Browse files

[PATCH v2 0/3] makedumpfile/arm64: Add '--mem-usage' support



Changes since v1:
----------------
- Updated patchset to read _stext symbol from '/proc/kallsyms' rather
  than from 'vmlinux' file.

Its good to have the makedumpfile '--mem-usage' support
for arm64 architecture as well, as it allows one to see the page numbers
of current system (1st kernel) in different use.

Using this we can know how many pages are dumpable when different
dump_level is specified.

Normally for x86_64, makedumpfile analyzes the 'System Ram' and
'kernel text' program segment of /proc/kcore excluding
the crashkernel range, then calculates the page number of different
kind per vmcoreinfo.

We use the similar logic for arm64, but in addition we determine
information like VA_BITS from kernel symbol like '_stext'.
This allows us to get the VA_BITS before 'set_kcore_vmcoreinfo()'
is called.

Also I have validated the '--mem-usage' makedumpfile option on several
ppc64/ppc64le and s390x machines, so update the makedumpfile.8
documentation to indicate that '--mem-usage' option is supported
not only on x86_64, but also on ppc64, s390x and arm64.

After this patch, when using the '--mem-usage' option with makedumpfile,
we get the correct information about the different pages. For e.g.
here is an output from my arm64 board:

TYPE            PAGES                   EXCLUDABLE      DESCRIPTION
----------------------------------------------------------------------
ZERO            49524                   yes             Pages filled with zero
NON_PRI_CACHE   15143                   yes             Cache pages without private flag
PRI_CACHE       29147                   yes             Cache pages with private flag
USER            3684                    yes             User process pages
FREE            1450569                 yes             Free pages
KERN_DATA       14243                   no              Dumpable kernel data

page size:              65536
Total pages on system:  1562310
Total size on system:   102387548160     Byte

Signed-off-by: default avatarBhupesh Sharma <bhsharma@redhat.com>

Bhupesh Sharma (3):
  Add a new helper file 'tools.c' that provides some useful APIs
  arm64: Add support to read symbols like _stext from '/proc/kallsyms'
  Documentation: Update documentation regarding --mem-usage' option
parent 6c6789ff
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment