From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E7571C4332F for ; Mon, 7 Nov 2022 14:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lwE7Tsm1nMY3TDI+ZR/a6pIY3KWFYRAooEp0KjMYduI=; b=P0eW+z3HnLLmhD VrD0mAKrqsnwsQrBB8v1VN/M9+B2pMG/DGJg5e+xxX4ON0iTYaiSOPpiKMTk7H+uJeiA+n/bqnXFZ s4W6zAMfupBDL3lJJ+rVnvqv0B6nKpSCW1XWoJ/7SOsoZD4ocT8eBDHtby5uBmcoxDQ6pFMYmfFrV j2oOPjNGuRisHZzHpWAENjgdADcNjlX+YXtuHAp8TIYSPs5DVsGT61k7QCnZ5tpEQLVvndvxrUajP WNg9JGEBXd1DxxpmtIB1l8MWk9e2igi3k7Hno17ZNUMO5BqymLKfSdKv1akSGC2Gyn+Db4WdHIHCl NZ+ZMvxElw8y/wEU93/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1os2mV-00F87F-MX; Mon, 07 Nov 2022 14:07:19 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1os2mS-00F85j-Q1; Mon, 07 Nov 2022 14:07:18 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 47A2DB81195; Mon, 7 Nov 2022 14:07:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 288D9C433D6; Mon, 7 Nov 2022 14:07:11 +0000 (UTC) Date: Mon, 7 Nov 2022 14:07:07 +0000 From: Catalin Marinas To: Zhen Lei Cc: Dave Young , Baoquan He , Vivek Goyal , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Will Deacon , linux-arm-kernel@lists.infradead.org, Jonathan Corbet , linux-doc@vger.kernel.org, "Eric W . Biederman" , Randy Dunlap , Feng Zhou , Kefeng Wang , Chen Zhou , John Donnelly , Dave Kleikamp Subject: Re: [PATCH v3 1/2] arm64: kdump: Provide default size when crashkernel=Y,low is not specified Message-ID: References: <20220711090319.1604-1-thunder.leizhen@huawei.com> <20220711090319.1604-2-thunder.leizhen@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220711090319.1604-2-thunder.leizhen@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221107_060717_001837_8ADFEFFE X-CRM114-Status: GOOD ( 19.08 ) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+kexec=archiver.kernel.org@lists.infradead.org On Mon, Jul 11, 2022 at 05:03:18PM +0800, Zhen Lei wrote: > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c > index 339ee84e5a61a0b..5390f361208ccf7 100644 > --- a/arch/arm64/mm/init.c > +++ b/arch/arm64/mm/init.c > @@ -96,6 +96,14 @@ phys_addr_t __ro_after_init arm64_dma_phys_limit = PHYS_MASK + 1; > #define CRASH_ADDR_LOW_MAX arm64_dma_phys_limit > #define CRASH_ADDR_HIGH_MAX (PHYS_MASK + 1) > > +/* > + * This is an empirical value in x86_64 and taken here directly. Please > + * refer to the code comment in reserve_crashkernel_low() of x86_64 for more > + * details. > + */ > +#define DEFAULT_CRASH_KERNEL_LOW_SIZE \ > + max(swiotlb_size_or_default() + (8UL << 20), 256UL << 20) I agree with Will here, we need a better comment and we might as well change the default value to something else until someone tells us that the default is not large enough. The default swiotlb size is 64M, so we need to cover that. The extra 8MB for any additional low allocations are ok as well but the 256MB doesn't make much sense to me, or at least not together with the rest. If the main kernel got a command line option for a larger swiotlb, does the crash kernel boot with the same command line? If not, we can just go for a fixed 128M value here, which is double the default swiotlb buffer. -- Catalin _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec