linux/Documentation/powerpc
Mahesh Salgaonkar a4e92ce8e4 powerpc/fadump: Reservationless firmware assisted dump
One of the primary issues with Firmware Assisted Dump (fadump) on Power
is that it needs a large amount of memory to be reserved. On large
systems with TeraBytes of memory, this reservation can be quite
significant.

In some cases, fadump fails if the memory reserved is insufficient, or
if the reserved memory was DLPAR hot-removed.

In the normal case, post reboot, the preserved memory is filtered to
extract only relevant areas of interest using the makedumpfile tool.
While the tool provides flexibility to determine what needs to be part
of the dump and what memory to filter out, all supported distributions
default this to "Capture only kernel data and nothing else".

We take advantage of this default and the Linux kernel's Contiguous
Memory Allocator (CMA) to fundamentally change the memory reservation
model for fadump.

Instead of setting aside a significant chunk of memory nobody can use,
this patch uses CMA instead, to reserve a significant chunk of memory
that the kernel is prevented from using (due to MIGRATE_CMA), but
applications are free to use it. With this fadump will still be able
to capture all of the kernel memory and most of the user space memory
except the user pages that were present in CMA region.

Essentially, on a P9 LPAR with 2 cores, 8GB RAM and current upstream:
[root@zzxx-yy10 ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:           7557         193        6822          12         541        6725
Swap:          4095           0        4095

With this patch:
[root@zzxx-yy10 ~]# free -m
              total        used        free      shared  buff/cache   available
Mem:           8133         194        7464          12         475        7338
Swap:          4095           0        4095

Changes made here are completely transparent to how fadump has
traditionally worked.

Thanks to Aneesh Kumar and Anshuman Khandual for helping us understand
CMA and its usage.

TODO:
- Handle case where CMA reservation spans nodes.

Signed-off-by: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-12-21 11:32:49 +11:00
..
bootwrapper.txt powerpc/bootwrapper: Add documentation of boot wrapper targets 2008-07-04 00:59:03 -06:00
cpu_families.txt powerpc: Add cpu family documentation 2014-06-05 13:20:01 +10:00
cpu_features.txt Documentation/powerpc: Fix path to the powerpc directory 2013-01-10 17:01:50 +11:00
cxl.txt cxl: Add psl9 specific code 2017-04-13 23:34:31 +10:00
cxlflash.txt scsi: cxlflash: Support AFU debug 2017-06-26 15:01:12 -04:00
DAWR-POWER9.txt powerpc: Document issues with the DAWR on POWER9 2018-07-02 23:54:28 +10:00
dscr.txt Doc: powerpc: Fix typos in Documentation/powerpc 2015-07-10 14:00:51 -06:00
eeh-pci-error-recovery.txt powerpc/eeh: rename EEH from "extended" to "enhanced" error handling 2016-04-11 20:30:42 +10:00
firmware-assisted-dump.txt powerpc/fadump: Reservationless firmware assisted dump 2018-12-21 11:32:49 +11:00
hvcs.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
isa-versions.rst powerpc: Add some documentation of ISA versions 2018-12-20 22:21:20 +11:00
mpc52xx.txt Documentation/powerpc/mpc52xx.txt: Checkpatch cleanup 2012-03-18 23:59:34 +01:00
pci_iov_resource_on_powernv.txt powerpc/pci: Add PCI resource alignment documentation 2015-03-31 13:02:38 +11:00
pmu-ebb.txt powerpc/perf: Core EBB support for 64-bit book3s 2013-07-01 11:50:10 +10:00
ptrace.txt powerpc/ptrace: Add DAWR debug feature info for userspace 2013-04-18 15:59:55 +10:00
qe_firmware.txt Doc: powerpc: Fix typos in Documentation/powerpc 2015-07-10 14:00:51 -06:00
syscall64-abi.txt powerpc/64: Document the syscall ABI 2016-09-20 14:36:14 +10:00
transactional_memory.txt powerpc: Document issues with TM on POWER9 2018-07-02 23:54:29 +10:00