linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Toshi Kani <toshi.kani-VXdhtT5mjnY@public.gmane.org>
Cc: Baoquan <bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	"Rafael J. Wysocki" <rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	tangchen-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org,
	linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	zhangyanfei-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org,
	dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Subject: Re: kdump failed because of hotplug memory adding in kdump kernel
Date: Thu, 9 Jan 2014 11:24:27 -0500	[thread overview]
Message-ID: <20140109162427.GF25897@redhat.com> (raw)
In-Reply-To: <1389283439.1792.66.camel-RbGIw1UOYPVo/CpIj0byZw@public.gmane.org>

On Thu, Jan 09, 2014 at 09:03:59AM -0700, Toshi Kani wrote:

[..]
> > > > > So basically acpi thinks that some memory block is a hot plug memory
> > > > > and tries to add it. And that consumes lots of memory and we don't have
> > > > > that memory in second kernel.
> > > > 
> > > > That's not exactly the case.  What seems to happen is that there is an ACPI
> > > > memory object in the ACPI namespace and the ACPI memory hotplug driver
> > > > attempts to bind to it.  That driver attempts to find removable memory blocks
> > > > associated with that object and to add them to the memory map.
> > > > 
> > > > Why don't you simply append acpi=off to the kexec command line?  That should
> > > > make the problem go away.
> > > 
> > > Yes, that should work, but Baoquan's approach makes sense to me.  When
> > > memmap=exactmap is specified, the kernel should ignore any memory
> > > information from the firmware.
> > 
> > memmap=exactmap is only for E820 map. It does not say that later memory
> > can not be hotplugged. So to me specifying exactmap does not imply that
> > memory hotplugging is disabled.
> 
> There are multiple ways to describe memory range info in the firmware;
> e820, EFI memory descriptor table, and ACPI memory device objects.  They
> basically provide the same info.

So ACPI memory device objects contain all the memory ranges as exported
in E820?

> 
> This problem happens when the firmware implements ACPI memory device
> objects, which are necessary to support memory hotplug, but do not mean
> that the system always supports hotplug when they exist.  They are
> optional objects that firmware vendors may choose to implement.

This is confusing. So even if memory hotplug is not supported, ACPI memory
device objects might be present. What's the purpose? How do they help.

If they represent same info as firmware provided using a BIOS call early
(E820 map), then how does system later avoid adding same memory ranges.

IOW, in terms of design, what's the objective. Why to create this
additional path of getting memory information.

> 
> While the exactmap option does not imply that memory hotplug is
> disabled,

But Bao's approach will disable memory hotplug on exactmap.

> it does require that the kernel only consumes user-supplied
> memory range information.  Hence, Baoquan's approach makes sense to me.

I am fine with this as long as memmap=exactmap is not the only way to
disable memory hotplug. I need another way too so that users who are
not using exactmap can still disable memory hotplug.

> 
> > IMO, it makes sense to have a separate knob to disable memory hotplug
> > behavior.
> 
> Regular users do not know if their systems implement ACPI memory device
> objects or not.  So, asking users to specify a separate option when
> their systems implement ACPI memory objects is tricky, IMO.

They can always specify no_memory_hotplug, irrespective of the fact that
kernel supports memory hotplug or not.

Anyway, I don't mind if one implicitly disables memory hotplug if
memmap=exactmap or mem=X is specified. It is just a matter of figuring
how what should be a more intutive behavior from user's point of view.

But I do want a separate path to disable memory hotplug so that even 
if I am not using memmap=exactmap or mem=X, I should be able to disable
memory hotplug.
 
> 
> > Also from kdump point of view, I don't want to rely on exactmap as in 
> > new implementation I am planning to move away from exactmap. I will
> > pass new memory map in bootparams and stop passing it on command line.
> 
> I think we still need a flag that indicates the kernel can only consume
> the new memory map in bootparams, and cannot to obtain from the
> firmware.

I think creating a new command line option is simpler as compared to
creating a new flag in bootparam which in turn disables memory hotplug.
More users can use that option. For example, if for some reason hotplug
code is crashing, one can just disable it on command line as work around
and move on.

Thanks
Vivek

  parent reply	other threads:[~2014-01-09 16:24 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-08 15:26 kdump failed because of hotplug memory adding in kdump kernel Baoquan
     [not found] ` <52CD6E33.400-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-08 15:58   ` Vivek Goyal
     [not found]     ` <20140108155829.GC13649-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-08 23:07       ` Rafael J. Wysocki
2014-01-09  0:11         ` Toshi Kani
2014-01-09 13:10           ` Rafael J. Wysocki
     [not found]             ` <1607377.rjs1kRTsnc-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2014-01-09 14:53               ` Vivek Goyal
     [not found]                 ` <20140109145359.GC25897-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-09 16:15                   ` Toshi Kani
2014-01-09 14:50           ` Vivek Goyal
2014-01-09 16:03             ` Toshi Kani
     [not found]               ` <1389283439.1792.66.camel-RbGIw1UOYPVo/CpIj0byZw@public.gmane.org>
2014-01-09 16:24                 ` Vivek Goyal [this message]
     [not found]                   ` <20140109162427.GF25897-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-01-09 17:24                     ` Toshi Kani
     [not found]                       ` <1389288265.1792.108.camel-RbGIw1UOYPVo/CpIj0byZw@public.gmane.org>
2014-01-09 18:23                         ` Vivek Goyal
2014-01-09 18:34                           ` Toshi Kani
     [not found]                             ` <1389292470.1792.109.camel-RbGIw1UOYPVo/CpIj0byZw@public.gmane.org>
2014-01-09 21:27                               ` Vivek Goyal
2014-01-09 21:56                                 ` Toshi Kani
2014-01-10  7:11                                   ` Baoquan
2014-01-10  8:06                                     ` Yasuaki Ishimatsu
     [not found]                                       ` <52CFAA20.2010109-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2014-01-10  9:14                                         ` Baoquan
2014-01-10  9:35                                           ` Yasuaki Ishimatsu
     [not found]                                             ` <52CFBECB.9040309-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
2014-01-10 10:27                                               ` Baoquan
2014-01-10 15:19                                           ` Toshi Kani
2014-01-10 15:56                                     ` Toshi Kani
2014-01-10  1:40                             ` Rafael J. Wysocki
2014-01-09  3:22         ` Baoquan
     [not found]         ` <8500545.JVNPnKcyD1-sKB8Sp2ER+y1GS7QM15AGw@public.gmane.org>
2014-01-09 14:48           ` Vivek Goyal

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=20140109162427.GF25897@redhat.com \
    --to=vgoyal-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=bhe-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-acpi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=rjw-LthD3rsA81gm4RdzfppkhA@public.gmane.org \
    --cc=tangchen-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org \
    --cc=toshi.kani-VXdhtT5mjnY@public.gmane.org \
    --cc=zhangyanfei-BthXqXjhjHXQFUHtdCDX3A@public.gmane.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;
as well as URLs for NNTP newsgroup(s).