LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>,
	linuxppc-dev <linuxppc-dev@ozlabs.org>
Cc: Hari Bathini <hbathini@linux.ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	Ananth Narayan <ananth@in.ibm.com>,
	kernelfans@gmail.com, Nathan Fontenot <nfont@linux.vnet.ibm.com>
Subject: Re: [v7,1/3] powerpc/fadump: Reservationless firmware assisted dump
Date: Mon, 24 Dec 2018 00:28:13 +1100 (AEDT)	[thread overview]
Message-ID: <43N38Z18hxz9sPC@ozlabs.org> (raw)
In-Reply-To: <153475303684.22527.5892283110957277667.stgit@jupiter.in.ibm.com>

On Mon, 2018-08-20 at 08:17:17 UTC, Mahesh J Salgaonkar wrote:
> From: Mahesh Salgaonkar <mahesh@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@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>

Series applied to powerpc next, thanks.

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

cheers

  reply	other threads:[~2018-12-23 14:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-20  8:17 [PATCH v7 0/3] powerpc/fadump: Improvements for firmware-assisted dump Mahesh J Salgaonkar
2018-08-20  8:17 ` [PATCH v7 1/3] powerpc/fadump: Reservationless firmware assisted dump Mahesh J Salgaonkar
2018-12-23 13:28   ` Michael Ellerman [this message]
2018-08-20  8:17 ` [PATCH v7 2/3] powerpc/fadump: throw proper error message on fadump registration failure Mahesh J Salgaonkar
2018-08-20  8:17 ` [PATCH v7 3/3] powerpc/fadump: Do not allow hot-remove memory from fadump reserved area Mahesh J Salgaonkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43N38Z18hxz9sPC@ozlabs.org \
    --to=patch-notifications@ellerman.id.au \
    --cc=ananth@in.ibm.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=hbathini@linux.ibm.com \
    --cc=kernelfans@gmail.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=nfont@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox