[PATCH v2 0/3] makedumpfile/arm64: Add '--mem-usage' support
Bhupesh Sharma
bhsharma at redhat.com
Mon Mar 5 09:12:53 PST 2018
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
Cc: Masaki Tachibana <mas-tachibana at vf.jp.nec.com>
Cc: Takuya Nakayama <tak-nakayama at tg.jp.nec.com>
Cc: Daisuke Nishimura <dai-nishimura at rc.jp.nec.com>
Signed-off-by: Bhupesh Sharma <bhsharma at 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
Makefile | 2 +-
arch/arm64.c | 78 +++++-
common.h | 8 +
makedumpfile.8 | 2 +-
makedumpfile.h | 14 ++
tools.c | 766 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 864 insertions(+), 6 deletions(-)
create mode 100644 tools.c
--
2.7.4
More information about the kexec
mailing list