From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 074D96126 for ; Tue, 9 Jan 2024 06:05:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="UniqjT2u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C862EC433F1; Tue, 9 Jan 2024 06:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704780332; bh=XPd0RK08tWKOZINB6b6dqpbqY/JsdvIb4rb1JcNGbh0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UniqjT2uQSbEWk9DR7Gyj5TlU4bsscbhMppvDMl1CKeQWbyj0/7Duu9+WFjkQRiXg +0VwpTibsiZI0CxW98HdwKO3yFXMphC2Slz5GGwzK9UwGwnoHcO9pKT2Dq3RgSoPpR MPnT7lWfyUxy0TpSNkAaX+qVBhwkNcsnxGLUIysFHb+0Hz+W/53j2nCd3nRPavstZP OALIy6yn9Ca7qXrGurgw8kMc9amlBqhd800wDtAtI0Dn55BvNaSMcXkUyQFJ0dKEs8 lXQjS5OCq1+wMumKJEB+qcGHon6T1uH7Sp5aYET8Xw3Zcd5xHfcZbE+5dagsSolXPO UYuniVAYlB6oA== Date: Tue, 9 Jan 2024 08:05:00 +0200 From: Mike Rapoport To: Wupeng Ma Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] efi: Disable mirror feature during crashkernel Message-ID: References: <20240109041536.3903042-1-mawupeng1@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > > 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 Acked-by: Mike Rapoport (IBM) > --- > 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 > #include > #include > +#include > #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.