linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Hari Bathini <hbathini@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
	Mahesh J Salgaonkar <mahesh@linux.vnet.ibm.com>
Subject: Re: [PATCH v2 1/2] fadump: reduce memory consumption for capture kernel
Date: Fri, 7 Apr 2017 23:11:54 +0530	[thread overview]
Message-ID: <a52dc3ad-d2ac-e228-2231-7c725167965d@linux.vnet.ibm.com> (raw)
In-Reply-To: <87efx4gwk2.fsf@concordia.ellerman.id.au>

Hi Michael,


On Friday 07 April 2017 07:16 PM, Michael Ellerman wrote:
> Hari Bathini <hbathini@linux.vnet.ibm.com> writes:
>> On Friday 07 April 2017 07:24 AM, Michael Ellerman wrote:
>>> My preference would be that the fadump kernel "just works". If it's
>>> using too much memory then the fadump kernel should do whatever it needs
>>> to use less memory, eg. shrinking nr_cpu_ids etc.
>>> Do we actually know *why* the fadump kernel is running out of memory?
>>> Obviously large numbers of CPUs is one of the main drivers (lots of
>>> stacks required). But other than that what is causing the memory
>>> pressure? I would like some data on that before we proceed.
>> Almost the same amount of memory in comparison with the memory
>> required to boot the production kernel but that is unwarranted for fadump
>> (dump capture) kernel.
> That's not data! :)

I am collating the data. Sorry! I should have mentioned it :)

> The dump kernel is booted with *much* less memory than the production
> kernel (that's the whole issue!) and so it doesn't need to create struct
> pages for all that memory, which means it should need less memory.

What I meant was, if we were to boot production kernel with mem=X, where 
X is
the smallest possible value to boot the kernel without resulting in an 
OOM, fadump
needed nearly the same amount to be reserved for it to capture dump without
hitting an OOM. But this was an observation on system with not so much 
memory.
Will try on a system with large memory and report back with data..

>
> The vfs caches are also sized based on the available memory, so they
> should also shrink in the dump kernel.
>
> I want some actual numbers on what's driving the memory usage.
>
> I tried some of these parameters to see how much memory they would save:
>
>> So, if parameters like
>> cgroup_disable=memory,
> 0 bytes saved.

Interesting.. was CONFIG_MEMCG set on the kernel?

>
>> transparent_hugepages=never,
> 0 bytes saved.

Not surprising unless transparent hugepages were used

>> numa=off,
> 64KB saved.

In the memory starved dump capture environment, every byte counts, I 
guess :)
Also, depends on the numa config?

>> nr_cpus=1,
> 3MB saved (vs 16 CPUs)
>
>
> Now maybe on your system those do save memory for some reason, but
> please prove it to me. Otherwise I'm inclined to merge:
>
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index 8ff0dd4e77a7..03f1f253c372 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -79,8 +79,10 @@ int __init early_init_dt_scan_fw_dump(unsigned long node,
>   	 * dump data waiting for us.
>   	 */
>   	fdm_active = of_get_flat_dt_prop(node, "ibm,kernel-dump", NULL);
> -	if (fdm_active)
> +	if (fdm_active) {
>   		fw_dump.dump_active = 1;
> +		nr_cpu_ids = 1;
> +	}
>
>   	/* Get the sizes required to store dump data for the firmware provided
>   	 * dump sections.

Necessary but not sufficient is the point I am trying to make. 
Apparently not
convincing enough. Will try and come back with relevant data :)

Thanks
Hari

  reply	other threads:[~2017-04-07 17:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-07 12:38 [PATCH v2 1/2] fadump: reduce memory consumption for capture kernel Hari Bathini
2017-02-07 12:38 ` [PATCH v2 2/2] fadump: update documentation about introduction of handover area Hari Bathini
2017-04-07  1:54 ` [PATCH v2 1/2] fadump: reduce memory consumption for capture kernel Michael Ellerman
2017-04-07  7:24   ` Hari Bathini
2017-04-07  9:06     ` Hari Bathini
2017-04-07 13:46     ` Michael Ellerman
2017-04-07 17:41       ` Hari Bathini [this message]
2017-04-12 20:29       ` Hari Bathini
2017-04-13 19:58         ` Michal Suchánek
2017-04-17 15:13           ` Hari Bathini
2017-04-18 14:18             ` Michal Suchánek
2017-04-19  4:19               ` Michael Ellerman
2017-04-19 14:08                 ` Michal Suchánek
2017-04-20 18:49                   ` Hari Bathini
2017-04-24 10:24                     ` Michal Suchánek
2017-04-24 12:56                       ` Hari Bathini
2017-04-24 14:00                         ` Michal Suchánek
2017-04-25 13:13                           ` Hari Bathini
2017-04-25 13:29                             ` Michal Suchánek

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=a52dc3ad-d2ac-e228-2231-7c725167965d@linux.vnet.ibm.com \
    --to=hbathini@linux.vnet.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=mahesh@linux.vnet.ibm.com \
    --cc=mpe@ellerman.id.au \
    /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;
as well as URLs for NNTP newsgroup(s).