From: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: yadviga@dev.rtsoft.ru, lugovskoy@dev.rtsoft.ru,
kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
Paul Mackerras <paulus@samba.org>,
Anton Blanchard <anton@samba.org>,
Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
Hari Bathini <hbathini@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] kexec/powerpc: fix exporting memory limit
Date: Fri, 7 Mar 2014 08:38:05 +0400 [thread overview]
Message-ID: <201403070838.07820@blacky.localdomain> (raw)
In-Reply-To: <1394153258.21206.1.camel@concordia>
> On Thu, 2014-03-06 at 18:24 +0400, Nikita Yushchenko wrote:
> > When preparing dump-capturing kernel, kexec userspace tool needs to
> > know actual amount of memory used by the running kernel. This may
> > differ from extire available DRAM for a couple of reasons. To address
> > this issue, kdump kernel support code injects several attributes into
> > device tree that are later captured by userspace kexec tool via /proc
> > interface.
> >
> > One such attrubute is 'chosen/linux,memory_limit' that is used to pass
> > memory limit of the running kernel.
> >
> > This was initialized using kernel's 'memory_limit' variable, that is
> > set by early init code based on mem= kernel parameter and other
> > reasons.
> >
> > But there are cases when memory_limit variable does not contain proper
> > information. One such case is when !CONFIG_HIGHMEM kernel runs on
> > system with memory large enough not to fit into lowmem.
>
> Why doesn't the !CONFIG_HIGHMEM code update memory_limit to reflect
> reality.
I guess because memory_limit is used for ... well, memory limit, set by
mem=. And for the rest memblock is used (and it *is* updated).
And code elsewhere does use memblock, see e.g. numa_enforce_memory_limit()
in arch/powerpc/mm/numa.c
In MMU init (MMU_init() in arch/powerpc/mm/init_32.c -which is the point
where final memory configuration is set) memblock, not memory_limit, is
both used and updated.
next prev parent reply other threads:[~2014-03-07 5:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 14:24 [PATCH] kexec/powerpc: fix exporting memory limit Nikita Yushchenko
2014-03-07 0:47 ` Michael Ellerman
2014-03-07 4:38 ` Nikita Yushchenko [this message]
2022-03-11 15:26 ` Christophe Leroy
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=201403070838.07820@blacky.localdomain \
--to=nyushchenko@dev.rtsoft.ru \
--cc=anton@samba.org \
--cc=hbathini@linux.vnet.ibm.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lugovskoy@dev.rtsoft.ru \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=yadviga@dev.rtsoft.ru \
/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).