[v7,1/3] powerpc/fadump: Reservationless firmware assisted dump

Michael Ellerman patch-notifications at ellerman.id.au
Mon Dec 24 00:28:13 AEDT 2018


On Mon, 2018-08-20 at 08:17:17 UTC, Mahesh J Salgaonkar wrote:
> From: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
> 
> 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 at 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 at 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 at linux.vnet.ibm.com>
> Signed-off-by: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
> Signed-off-by: Hari Bathini <hbathini at linux.ibm.com>

Series applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/a4e92ce8e4c8275bacfe3529d6ac85

cheers


More information about the Linuxppc-dev mailing list