linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Xuefeng Li <lixuefeng@loongson.cn>,
	linux-mips@vger.kernel.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 0/4] MIPS: Modify mem= and memmap= parameter
Date: Tue, 1 Mar 2022 16:31:46 +0200	[thread overview]
Message-ID: <Yh4uUoYT+YS5Jxsv@kernel.org> (raw)
In-Reply-To: <cfd74b5b-39c3-733a-5226-515991f91f39@loongson.cn>

On Tue, Mar 01, 2022 at 07:51:23PM +0800, Tiezhu Yang wrote:
> 
> 
> On 03/01/2022 05:55 PM, Mike Rapoport wrote:
> > Hi,
> > 
> > On Tue, Mar 01, 2022 at 12:28:57PM +0800, Tiezhu Yang wrote:
> > > In the current code, the kernel command-line parameter mem= and memmap=
> > > can not work well on MIPS, this patchset refactors the related code to
> > > fix them.
> > > 
> > > For kdump on MIPS, if the users want to limit the memory region for the
> > > capture kernel to avoid corrupting the memory image of the panic kernel,
> > > use the parameter memmap=limit@base is the proper way, I will submit a
> > > patch to use memmap=limit@base for kexec-tools after this patchset is
> > > applied.
> > 
> > Sorry, apparently I misread the prevoius version.
> > What's wrong with the current implementation of mem=limit@base for the
> > kdump case?
> 
> In the current code, without this patchset, kernel boot hangs when add
> mem=3G, mem=3G@64M or memmap=3G@64M to the command-line, it means that
> the parameter mem= and memmap= have bug on mips.

I can see how mem=3G may be wrong when the memory does not start at 0, but
it seems to do the right thing of mem=3G@64M. 

Do you see system hangs with mem=3G@64M?

Do you have the logs before the hang?

As for memmap= option, it does not specify the memory map but rather alters
the memory map passed by the firmware. Particularity in MIPS implementation
it allows to add a single range of available or reserved memory.

AFAIU, for the kdump use-case mem=X@Y should suffice.

> Thanks,
> Tiezhu
> 
> > 
> > > v4: Fix some build warnings reported by kernel test robot
> > > 
> > > v3: Modify patch #3 to maintain compatibility for memmap=limit{$,#,!}base,
> > >     commented by Mike Rapoport, thank you
> > > 
> > > v2: Add some new patches to support memmap=limit@base
> > > 
> > > Tiezhu Yang (4):
> > >   MIPS: Refactor early_parse_mem() to fix mem= parameter
> > >   memblock: Introduce memblock_mem_range_remove_map()
> > >   MIPS: Refactor early_parse_memmap() to fix memmap= parameter
> > >   MIPS: Remove not used variable usermem
> > > 
> > >  arch/mips/kernel/setup.c | 69 ++++++++++++++++++++++--------------------------
> > >  include/linux/memblock.h |  1 +
> > >  mm/memblock.c            |  9 +++++--
> > >  3 files changed, 40 insertions(+), 39 deletions(-)
> > > 
> > > --
> > > 2.1.0
> > > 
> > 
> 

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2022-03-01 14:32 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-01  4:28 Tiezhu Yang
2022-03-01  4:28 ` [PATCH v4 1/4] MIPS: Refactor early_parse_mem() to fix mem= parameter Tiezhu Yang
2022-03-04 15:10   ` Thomas Bogendoerfer
2022-03-04 15:35     ` Thomas Bogendoerfer
2022-03-04 17:11       ` Maciej W. Rozycki
2022-03-05 13:13         ` Mike Rapoport
2022-03-07 16:29         ` Thomas Bogendoerfer
2022-03-07 22:07           ` Mike Rapoport
2022-03-07 23:09             ` Maciej W. Rozycki
2022-03-01  4:28 ` [PATCH v4 2/4] memblock: Introduce memblock_mem_range_remove_map() Tiezhu Yang
2022-03-01  4:29 ` [PATCH v4 3/4] MIPS: Refactor early_parse_memmap() to fix memmap= parameter Tiezhu Yang
2022-03-01  4:29 ` [PATCH v4 4/4] MIPS: Remove not used variable usermem Tiezhu Yang
2022-03-01  9:55 ` [PATCH v4 0/4] MIPS: Modify mem= and memmap= parameter Mike Rapoport
2022-03-01 11:51   ` Tiezhu Yang
2022-03-01 14:31     ` Mike Rapoport [this message]
2022-03-02  1:50       ` Tiezhu Yang
2022-03-02  8:03         ` Mike Rapoport
2022-03-02  9:28           ` Tiezhu Yang
2022-03-02 12:50             ` Mike Rapoport
2022-03-04 17:05         ` Maciej W. Rozycki
2022-03-05  6:19           ` Tiezhu Yang
2022-03-05 13:26             ` Mike Rapoport
2022-03-05 19:21               ` Maciej W. Rozycki
2022-03-05 20:09                 ` Mike Rapoport
2022-03-06  1:22                   ` Maciej W. Rozycki
2022-03-05 20:53                 ` Maciej W. Rozycki

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=Yh4uUoYT+YS5Jxsv@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lixuefeng@loongson.cn \
    --cc=tsbogend@alpha.franken.de \
    --cc=yangtiezhu@loongson.cn \
    /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