• Mahesh Salgaonkar's avatar
    powerpc/fadump: Reservationless firmware assisted dump · a4e92ce8
    Mahesh Salgaonkar authored
    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: 's avatarAnanth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
    Signed-off-by: 's avatarMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Signed-off-by: 's avatarHari Bathini <hbathini@linux.ibm.com>
    Signed-off-by: Michael Ellerman's avatarMichael Ellerman <mpe@ellerman.id.au>
    a4e92ce8
Name
Last commit
Last update
..
DAWR-POWER9.txt Loading commit data...
bootwrapper.txt Loading commit data...
cpu_families.txt Loading commit data...
cpu_features.txt Loading commit data...
cxl.txt Loading commit data...
cxlflash.txt Loading commit data...
dscr.txt Loading commit data...
eeh-pci-error-recovery.txt Loading commit data...
firmware-assisted-dump.txt Loading commit data...
hvcs.txt Loading commit data...
isa-versions.rst Loading commit data...
mpc52xx.txt Loading commit data...
pci_iov_resource_on_powernv.txt Loading commit data...
pmu-ebb.txt Loading commit data...
ptrace.txt Loading commit data...
qe_firmware.txt Loading commit data...
syscall64-abi.txt Loading commit data...
transactional_memory.txt Loading commit data...