From: Baoquan He <bhe@redhat.com>
To: Huacai Chen <chenhc@lemote.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
kexec@lists.infradead.org,
"open list:MIPS" <linux-mips@vger.kernel.org>,
Jiaxun Yang <jiaxun.yang@flygoat.com>,
Eric Biederman <ebiederm@xmission.com>,
Fuxin Zhang <zhangfx@lemote.com>, Dave Young <dyoung@redhat.com>,
Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH 1/3] MIPS: Crash kernel should be able to see old memories
Date: Wed, 23 Sep 2020 11:08:47 +0800 [thread overview]
Message-ID: <20200923030847.GM25604@MiWiFi-R3L-srv> (raw)
In-Reply-To: <CAAhV-H66O77hK7kB8cCcM6XUOc-TFEg_TJG+GrCSEdD89Qxb7g@mail.gmail.com>
On 09/23/20 at 10:58am, Huacai Chen wrote:
> Hi, Baoquan,
>
> On Wed, Sep 23, 2020 at 10:46 AM Baoquan He <bhe@redhat.com> wrote:
> >
> > On 09/23/20 at 10:30am, Huacai Chen wrote:
> > > Kexec-tools use mem=X@Y to pass usable memories to crash kernel, but in
> > > commit a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map") all
> > > BIOS passed memories are removed by early_parse_mem(). I think this is
> > > reasonable for a normal kernel but not for a crash kernel, because a
> > > crash kernel should be able to see all old memories, even though it is
> > > not supposed to use them.
> >
> > I am not familiar with MIPS code, but we analyze and fill memmap= to
> > pass usable memory to crashkenrel in kexec-tools, do you mean you are
> > specifying memmap= or mem= by hand?
> Not by hand, but by code of kexec-tools via the "mem=" parameter.
OK, please ignore my comments.
>
> As I know, kexec-tools of MIPS only use "mem=" to pass "usable"
> memory, but not "visible" memory. "Visible" memory of the crash kernel
> is still passed by BIOS (strictly, by the old kernel who duplicates
> information from BIOS). If memblock_remove() executed here, it would
> remove all "visible" memory and make "visible" memory the same as
> "usable" memory, and I think this is not correct.
>
> >
> > And we don't have mem=X@Y, only mem=nn[KMG].
> The relocatable kernel of MIPS is still unusable now, so MIPS should
> use mem=X@Y, and the crash kernel is always different from normal
> kernel.
Interesting. Seems MIPS does support mem=X@Y, even though the document
of 'mem=' says it's used to specify amount of memory, but not memory
region. Anyway, leave this to mips reviewers, thanks for replying.
~~~~~~~~~~~~~~~~~~~
mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory
Amount of memory to be used in cases as follows:
>
> >
> > >
> > > Fixes: a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map")
> > > Signed-off-by: Huacai Chen <chenhc@lemote.com>
> > > ---
> > > arch/mips/kernel/setup.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> > > index 4c04a86..e2804a2 100644
> > > --- a/arch/mips/kernel/setup.c
> > > +++ b/arch/mips/kernel/setup.c
> > > @@ -392,8 +392,10 @@ static int __init early_parse_mem(char *p)
> > > */
> > > if (usermem == 0) {
> > > usermem = 1;
> > > +#ifndef CONFIG_CRASH_DUMP
> > > memblock_remove(memblock_start_of_DRAM(),
> > > memblock_end_of_DRAM() - memblock_start_of_DRAM());
> > > +#endif
> > > }
> > > start = 0;
> > > size = memparse(p, &p);
> > > --
> > > 2.7.0
> > >
> >
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
WARNING: multiple messages have this Message-ID (diff)
From: Baoquan He <bhe@redhat.com>
To: Huacai Chen <chenhc@lemote.com>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
Eric Biederman <ebiederm@xmission.com>,
Dave Young <dyoung@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
"open list:MIPS" <linux-mips@vger.kernel.org>,
kexec@lists.infradead.org, Fuxin Zhang <zhangfx@lemote.com>,
Jiaxun Yang <jiaxun.yang@flygoat.com>
Subject: Re: [PATCH 1/3] MIPS: Crash kernel should be able to see old memories
Date: Wed, 23 Sep 2020 11:08:47 +0800 [thread overview]
Message-ID: <20200923030847.GM25604@MiWiFi-R3L-srv> (raw)
In-Reply-To: <CAAhV-H66O77hK7kB8cCcM6XUOc-TFEg_TJG+GrCSEdD89Qxb7g@mail.gmail.com>
On 09/23/20 at 10:58am, Huacai Chen wrote:
> Hi, Baoquan,
>
> On Wed, Sep 23, 2020 at 10:46 AM Baoquan He <bhe@redhat.com> wrote:
> >
> > On 09/23/20 at 10:30am, Huacai Chen wrote:
> > > Kexec-tools use mem=X@Y to pass usable memories to crash kernel, but in
> > > commit a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map") all
> > > BIOS passed memories are removed by early_parse_mem(). I think this is
> > > reasonable for a normal kernel but not for a crash kernel, because a
> > > crash kernel should be able to see all old memories, even though it is
> > > not supposed to use them.
> >
> > I am not familiar with MIPS code, but we analyze and fill memmap= to
> > pass usable memory to crashkenrel in kexec-tools, do you mean you are
> > specifying memmap= or mem= by hand?
> Not by hand, but by code of kexec-tools via the "mem=" parameter.
OK, please ignore my comments.
>
> As I know, kexec-tools of MIPS only use "mem=" to pass "usable"
> memory, but not "visible" memory. "Visible" memory of the crash kernel
> is still passed by BIOS (strictly, by the old kernel who duplicates
> information from BIOS). If memblock_remove() executed here, it would
> remove all "visible" memory and make "visible" memory the same as
> "usable" memory, and I think this is not correct.
>
> >
> > And we don't have mem=X@Y, only mem=nn[KMG].
> The relocatable kernel of MIPS is still unusable now, so MIPS should
> use mem=X@Y, and the crash kernel is always different from normal
> kernel.
Interesting. Seems MIPS does support mem=X@Y, even though the document
of 'mem=' says it's used to specify amount of memory, but not memory
region. Anyway, leave this to mips reviewers, thanks for replying.
~~~~~~~~~~~~~~~~~~~
mem=nn[KMG] [KNL,BOOT] Force usage of a specific amount of memory
Amount of memory to be used in cases as follows:
>
> >
> > >
> > > Fixes: a94e4f24ec836c8984f83959 ("MIPS: init: Drop boot_mem_map")
> > > Signed-off-by: Huacai Chen <chenhc@lemote.com>
> > > ---
> > > arch/mips/kernel/setup.c | 2 ++
> > > 1 file changed, 2 insertions(+)
> > >
> > > diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c
> > > index 4c04a86..e2804a2 100644
> > > --- a/arch/mips/kernel/setup.c
> > > +++ b/arch/mips/kernel/setup.c
> > > @@ -392,8 +392,10 @@ static int __init early_parse_mem(char *p)
> > > */
> > > if (usermem == 0) {
> > > usermem = 1;
> > > +#ifndef CONFIG_CRASH_DUMP
> > > memblock_remove(memblock_start_of_DRAM(),
> > > memblock_end_of_DRAM() - memblock_start_of_DRAM());
> > > +#endif
> > > }
> > > start = 0;
> > > size = memparse(p, &p);
> > > --
> > > 2.7.0
> > >
> >
>
next prev parent reply other threads:[~2020-09-23 3:09 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-23 2:30 [PATCH 1/3] MIPS: Crash kernel should be able to see old memories Huacai Chen
2020-09-23 2:30 ` Huacai Chen
2020-09-23 2:30 ` [PATCH 2/3] MIPS: Reserve extra memory for crash dump Huacai Chen
2020-09-23 2:30 ` Huacai Chen
2020-09-23 2:30 ` [PATCH 3/3] MIPS: Loongson64: Add kexec/kdump support Huacai Chen
2020-09-23 2:30 ` Huacai Chen
2020-09-23 3:35 ` Jinyang He
2020-09-23 3:35 ` Jinyang He
2020-09-24 0:31 ` Huacai Chen
2020-09-24 0:31 ` Huacai Chen
2020-09-23 13:35 ` Jiaxun Yang
2020-09-23 13:35 ` Jiaxun Yang
2020-09-24 1:19 ` Huacai Chen
2020-09-24 1:19 ` Huacai Chen
2020-09-24 1:48 ` Jiaxun Yang
2020-09-24 1:48 ` Jiaxun Yang
2020-09-24 2:15 ` Jinyang He
2020-09-24 2:15 ` Jinyang He
2020-09-23 2:45 ` [PATCH 1/3] MIPS: Crash kernel should be able to see old memories Baoquan He
2020-09-23 2:45 ` Baoquan He
2020-09-23 2:58 ` Huacai Chen
2020-09-23 2:58 ` Huacai Chen
2020-09-23 3:08 ` Baoquan He [this message]
2020-09-23 3:08 ` Baoquan He
2020-10-03 21:07 ` Maciej W. Rozycki
2020-10-03 21:07 ` Maciej W. Rozycki
2020-10-05 0:40 ` Maciej W. Rozycki
2020-10-05 0:40 ` Maciej W. Rozycki
2020-09-23 3:02 ` Jinyang He
2020-09-23 3:02 ` Jinyang He
2020-09-23 3:13 ` Huacai Chen
2020-09-23 3:13 ` Huacai Chen
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=20200923030847.GM25604@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=chenhc@lemote.com \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=jiaxun.yang@flygoat.com \
--cc=kexec@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=vgoyal@redhat.com \
--cc=zhangfx@lemote.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.