public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: WANG Chao <chaowang@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Pekka Enberg <penberg@kernel.org>,
	Jacob Shin <jacob.shin@amd.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"kexec@lists.infradead.org" <kexec@lists.infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86, kdump: crashkernel=X try to reserve below 896M first, then try below 4G, then MAXMEM
Date: Mon, 28 Oct 2013 11:12:24 -0400	[thread overview]
Message-ID: <20131028151224.GB1659@redhat.com> (raw)
In-Reply-To: <CAE9FiQUw6REg2TXnSXtNZK8XY9vnorvi8oDbUn_5WdNZ6yiRtQ@mail.gmail.com>

On Thu, Oct 24, 2013 at 10:48:29PM -0700, Yinghai Lu wrote:
> On Thu, Oct 24, 2013 at 12:27 PM, Vivek Goyal <vgoyal@redhat.com> wrote:
> > On Thu, Oct 24, 2013 at 12:24:57PM -0700, Yinghai Lu wrote:
> >> On Thu, Oct 24, 2013 at 12:18 PM, Vivek Goyal <vgoyal@redhat.com> wrote:
> >> > On Thu, Oct 24, 2013 at 12:15:25PM -0700, Yinghai Lu wrote:
> >> >
> >> > Also keeping things simple by not trying to *impose* a new crashkernel=
> >> > syntax on existing crashkernel=xM users.
> >>
> >> Existing user that have crashkernel=xM working with their old kernel
> >> and old kexec-tools, they still could keep their old command line and
> >> old kexec-tools
> >> with new updated kernel.
> >> We should not change semantics to surprise them.
> >
> > Old users will get reservation still below 896MB.
> >
> > It will go above 896MB only if memory could not be allocated below 896MB.
> >
> > In the past reservation will fail and kexec-tools will fail.
> > Now reservation will succeed but kexec-tools will fail.
> >
> > So end result a user sees is that kexec-tools fails. So I don't see how
> > we are breaking existing installations or user setups.
> 
> case could be: if user add more memory and put more pcie cards, and
> second kernel will need more ram and OOM there.

Now makedumpfile supports cyclic mode by default. So one does not have
to necessarily linearly scale reserved memory based on physical memory
present in the box.

> so user could just increase crashkernel=512M to crashkernel=1G.

If user has new makedumpfile, OOM should not happen and one should not
have to increase memory reservation.

> 
> without Cong's patch, kernel will fail to reserve, and user would dig
> to change it
> to crashkernel=1G,high, and update kexec-tools.
> 
> with Cong's patch, kernel will reserve other range like between 896
> and 4G, old kexec-tools either
> fail to load second kernel or hang in purgatory or early stage of
> second kernel, or other unknown behavior.

I understand your concern about memory being reserved high and kexec
just hanging. Only thing I am arguing is that the number of cases where
it will happen is small.

- First of all for all old existing kexec-tools memory will stil come
  from 896MB.
- Old kexec-tools enforced that purgatory is loaded below 2G. So if 
  memory is reserved above 2G, kexec-tools will fail.

So only problematic case seems to be that if user increased crashkernel=X
value and memory got reserved between 896M and 2G. But this is not same
as breaking old setups as old setups anyway never worked with this 
configuration.

You argument that user will research and upgrade kexec-tools and use
crashkernel=X,high, then it holds true for the case where memory is
reserved between 896M and 2G.

I personally think that it is easier for a user to not change any
kernel parameters with kernel and kexec-tools upgrade and still be
able to work with large memory systems. So the benefit of extending
the semantics of existing parameter seems to be outweighing the downside
of side, IMHO.

> 
> I would think first path is much clear and predicted.
> 
> If my memory is right, HPA did not like idea that we try below 896M,
> and then under 4G and then above 4G.

hpa, I know you did not like the idea in the past. Is it still the case.

IMHO, I like the fact that existing users still be able to work with
crashkernel=X and not forced to switch to crashkernel=x,high and also incur
the penalty of reserving extra memory for software iotlb.

Thanks
Vivek

  parent reply	other threads:[~2013-10-28 15:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14 11:46 [PATCH] x86, kdump: crashkernel=X try to reserve below 896M first, then try below 4G, then MAXMEM WANG Chao
2013-10-14 18:54 ` Yinghai Lu
2013-10-15  3:00   ` WANG Chao
2013-10-15 14:48   ` Vivek Goyal
2013-10-18  3:50     ` Yinghai Lu
2013-10-18 12:38       ` Vivek Goyal
2013-10-19  5:45         ` Yinghai Lu
2013-10-21 15:16           ` Vivek Goyal
2013-10-24  6:11             ` Yinghai Lu
2013-10-24 11:01               ` WANG Chao
2013-10-24 19:13                 ` Yinghai Lu
2013-10-24 19:24                   ` Vivek Goyal
2013-10-24 14:02               ` Vivek Goyal
2013-10-24 19:15                 ` Yinghai Lu
2013-10-24 19:18                   ` Vivek Goyal
2013-10-24 19:24                     ` Yinghai Lu
2013-10-24 19:27                       ` Vivek Goyal
2013-10-24 19:37                         ` Vivek Goyal
2013-10-25  5:48                         ` Yinghai Lu
2013-10-28  5:49                           ` Dave Young
2013-10-28  5:51                             ` Dave Young
2013-10-28 15:12                           ` Vivek Goyal [this message]
2013-11-04 14:38                             ` WANG Chao
2013-10-28  5:47               ` Dave Young
2013-10-24 19:04 ` Yinghai Lu
2013-10-28  6:43   ` WANG Chao

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=20131028151224.GB1659@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=chaowang@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=hpa@zytor.com \
    --cc=jacob.shin@amd.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=penberg@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=yinghai@kernel.org \
    /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