mbox series

[v2,0/3] powerpc/fadump: pass additional args to dump capture kernel

Message ID 20240509115755.519982-1-hbathini@linux.ibm.com (mailing list archive)
Headers show
Series powerpc/fadump: pass additional args to dump capture kernel | expand

Message

Hari Bathini May 9, 2024, 11:57 a.m. UTC
While fadump is a more reliable alternative to kdump dump capturing
method, it doesn't support passing additional parameters. Having
such support is desirable for two major reasons:

  1. It helps minimize the memory consumption of fadump dump capture
     kernel by disabling features that consume considerable amount of
     memory but have little significance for dump capture environment
     (eg. numa, cma, cgroup, etc.)
   2. It helps disable such features/components in dump capture kernel
      that are unstable and/or are being debugged.

This patch series is a follow-up to [1]. Adds support for passing
additional parameters to fadump capture kernel to make it more
desirable. For this, a dedicated area is passed between production
kernel and capture kerenl to pass these additional parameters. This
support is enabled only on pseries as of now. The dedicated area is
referred to as RTAS_FADUMP_PARAM_AREA.

In radix MMU mode, this dedicated area can be anywhere but in case of
hash MMU, it can only be in the first memory block to be accessible
during early boot. Enabling this feature support in both radix and
hash MMU modes but in hash MMU only when RMA size is 768MB or more
to avoid complex memory real estate with FW components.

The first patch adds support for multiple boot memory regions to make
addition of any new region types simpler. The second patch sets up the
parameter (dedicated) area to be passed to the capture kernel.
/sys/kernel/fadump/bootargs_append is exported to the userspace to
specify the additional parameters to be passed to the capture kernel.
The last patch appends the parameters to bootargs during capture
kernel boot.

Changes in v2:
* RFC tag removed.
* Moved variable declaration out of switch case.
* Zero'ed the parameter area while setting up.
* Reserving the parameter area only when needed.

[1] https://lore.kernel.org/linuxppc-dev/20231205201835.388030-1-hbathini@linux.ibm.com/

Hari Bathini (3):
  powerpc/pseries/fadump: add support for multiple boot memory regions
  powerpc/fadump: setup additional parameters for dump capture kernel
  powerpc/fadump: pass additional parameters when fadump is active

 arch/powerpc/include/asm/fadump-internal.h   |   5 +-
 arch/powerpc/include/asm/fadump.h            |   2 +
 arch/powerpc/kernel/fadump.c                 | 149 ++++++++--
 arch/powerpc/kernel/prom.c                   |   3 +
 arch/powerpc/platforms/powernv/opal-fadump.c |  13 +-
 arch/powerpc/platforms/pseries/rtas-fadump.c | 290 +++++++++++++------
 arch/powerpc/platforms/pseries/rtas-fadump.h |  29 +-
 7 files changed, 366 insertions(+), 125 deletions(-)

Comments

Michael Ellerman May 13, 2024, 1:22 p.m. UTC | #1
On Thu, 09 May 2024 17:27:52 +0530, Hari Bathini wrote:
> While fadump is a more reliable alternative to kdump dump capturing
> method, it doesn't support passing additional parameters. Having
> such support is desirable for two major reasons:
> 
>   1. It helps minimize the memory consumption of fadump dump capture
>      kernel by disabling features that consume considerable amount of
>      memory but have little significance for dump capture environment
>      (eg. numa, cma, cgroup, etc.)
>    2. It helps disable such features/components in dump capture kernel
>       that are unstable and/or are being debugged.
> 
> [...]

Applied to powerpc/next.

[1/3] powerpc/pseries/fadump: add support for multiple boot memory regions
      https://git.kernel.org/powerpc/c/78d5cc15fb7d1b2683f0baf418a9a870c02319fb
[2/3] powerpc/fadump: setup additional parameters for dump capture kernel
      https://git.kernel.org/powerpc/c/683eab94da75bcf55a9c65e0c31d0529edebe86d
[3/3] powerpc/fadump: pass additional parameters when fadump is active
      https://git.kernel.org/powerpc/c/3416c9daa6b13c0e2a656d4e2dee8de95f9a38cf

cheers