linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Wupeng Ma <mawupeng1@huawei.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] efi: Disable mirror feature during crashkernel
Date: Tue, 9 Jan 2024 08:05:00 +0200	[thread overview]
Message-ID: <ZZziDIc0C9BHhhu4@kernel.org> (raw)
In-Reply-To: <20240109041536.3903042-1-mawupeng1@huawei.com>

On Tue, Jan 09, 2024 at 12:15:36PM +0800, Wupeng Ma wrote:
> From: Ma Wupeng <mawupeng1@huawei.com>
> 
> If system have no mirrored memory or use crashkernel.high while
> kernelcore=mirror is enabled in cmdline, during crashkernel,
> there will be limited mirrored memory and this usually lead to
> OOM.
> 
> To solve this problem, disable mirror feature during crashkernel.
> 
> Signed-off-by: Ma Wupeng <mawupeng1@huawei.com>

Acked-by: Mike Rapoport (IBM) <rppt@kernel.org>

> ---
>  mm/mm_init.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/mm/mm_init.c b/mm/mm_init.c
> index 077bfe393b5e..513bad672708 100644
> --- a/mm/mm_init.c
> +++ b/mm/mm_init.c
> @@ -26,6 +26,7 @@
>  #include <linux/pgtable.h>
>  #include <linux/swap.h>
>  #include <linux/cma.h>
> +#include <linux/crash_dump.h>
>  #include "internal.h"
>  #include "slab.h"
>  #include "shuffle.h"
> @@ -381,6 +382,11 @@ static void __init find_zone_movable_pfns_for_nodes(void)
>  			goto out;
>  		}
>  
> +		if (is_kdump_kernel()) {
> +			pr_warn("The system is under kdump, ignore kernelcore=mirror.\n");
> +			goto out;
> +		}
> +
>  		for_each_mem_region(r) {
>  			if (memblock_is_mirror(r))
>  				continue;
> -- 
> 2.25.1
> 

-- 
Sincerely yours,
Mike.


      reply	other threads:[~2024-01-09  6:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-09  4:15 [PATCH] efi: Disable mirror feature during crashkernel Wupeng Ma
2024-01-09  6:05 ` Mike Rapoport [this message]

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=ZZziDIc0C9BHhhu4@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mawupeng1@huawei.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 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).