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 X-Spam-Level: X-Spam-Status: No, score=-13.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2140DC43461 for ; Tue, 8 Sep 2020 03:21:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FE36206DB for ; Tue, 8 Sep 2020 03:21:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Ifk0FlE0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FE36206DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KmySO5yZRBiD+1Ovl8dABobW20JjF/auPhaalS5FqWA=; b=Ifk0FlE0aJGi5R9Bmh/R1eRxS HirWa6Kj7yRcqcTKkWOfn2p0B2dW2y6aSeTwXS1/nZKf8iRZvek5aXB01mSSMv9B5vjeA2za3DKou S2/aJDtB1Pe/Cf1J9QuNNTNEl9s45JOa8k6WbvCflt5pg2BpzlJTJoUW2jSkRYutVPoYekiJ9k9Rp 27kXZSUlwrj5RdJD8JO7xWuTc6M/AI4Kpyv/2aBTjk/NPKrjApKjhx1uUvtzQBcADfAoGV6DRV1fB gDGmrlYzJc669BYUoF4jKY1ykC73eiPU7yh9UYmIJhk1JEJpKETKJlIUUSsseG4VFG9sNeG5XYoEG Gx/k8nmsg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFUAv-0006iC-Bj; Tue, 08 Sep 2020 03:20:05 +0000 Received: from szxga06-in.huawei.com ([45.249.212.32] helo=huawei.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kFUAq-0006gm-SJ; Tue, 08 Sep 2020 03:20:02 +0000 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 2C1BBABCE4975FAC3F91; Tue, 8 Sep 2020 11:19:53 +0800 (CST) Received: from [127.0.0.1] (10.174.176.220) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.487.0; Tue, 8 Sep 2020 11:19:44 +0800 Subject: Re: [PATCH v12 1/9] x86: kdump: move CRASH_ALIGN to 2M To: Dave Young References: <20200907134745.25732-1-chenzhou10@huawei.com> <20200907134745.25732-2-chenzhou10@huawei.com> <20200908012138.GA3058@dhcp-128-65.nay.redhat.com> From: chenzhou Message-ID: Date: Tue, 8 Sep 2020 11:19:42 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20200908012138.GA3058@dhcp-128-65.nay.redhat.com> X-Originating-IP: [10.174.176.220] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200907_232001_193199_3AB2CE01 X-CRM114-Status: GOOD ( 17.83 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: wangkefeng.wang@huawei.com, linux-doc@vger.kernel.org, catalin.marinas@arm.com, bhsharma@redhat.com, huawei.libin@huawei.com, guohanjun@huawei.com, will@kernel.org, bhe@redhat.com, corbet@lwn.net, mingo@redhat.com, John.P.donnelly@oracle.com, arnd@arndb.de, xiexiuqi@huawei.com, horms@verge.net.au, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, robh+dt@kernel.org, james.morse@arm.com, prabhakar.pkin@gmail.com, nsaenzjulienne@suse.de Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020/9/8 9:21, Dave Young wrote: > Hi, > > On 09/07/20 at 09:47pm, Chen Zhou wrote: >> CONFIG_PHYSICAL_ALIGN can be selected from 2M to 16M and default >> value is 2M, so move CRASH_ALIGN to 2M, with smaller value reservation >> can have more chance to succeed. > Seems still some misunderstanding about the change :( I'm sorry if I > did not explain it clearly. > > Previously I missed the PHYSICAL_ALIGN can change according to .config > I mean we should change the value to CONFIG_PHYSICAL_ALIGN for X86 > And I suggest to move back to keep using 16M. And do not change it in > this series. Hi Dave, Sorry, i misunderstood about this. Ok, this patch will keep the value of CRASH_ALIGN as it is, just move CRASH_ALIGN to header asm/kexec.h and replace the hard-coded alignment with macro CRASH_ALIGN in function reserve_crashkernel(). Thanks, Chen Zhou > >> And replace the hard-coded alignment with macro CRASH_ALIGN in function >> reserve_crashkernel(). >> >> Suggested-by: Dave Young >> Signed-off-by: Chen Zhou >> --- >> arch/x86/include/asm/kexec.h | 3 +++ >> arch/x86/kernel/setup.c | 5 +---- >> 2 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/arch/x86/include/asm/kexec.h b/arch/x86/include/asm/kexec.h >> index 6802c59e8252..83f200dd54a1 100644 >> --- a/arch/x86/include/asm/kexec.h >> +++ b/arch/x86/include/asm/kexec.h >> @@ -18,6 +18,9 @@ >> >> # define KEXEC_CONTROL_CODE_MAX_SIZE 2048 >> >> +/* 2M alignment for crash kernel regions */ >> +#define CRASH_ALIGN SZ_2M >> + >> #ifndef __ASSEMBLY__ >> >> #include >> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c >> index 3511736fbc74..296294ad0dd8 100644 >> --- a/arch/x86/kernel/setup.c >> +++ b/arch/x86/kernel/setup.c >> @@ -402,9 +402,6 @@ static void __init memblock_x86_reserve_range_setup_data(void) >> >> #ifdef CONFIG_KEXEC_CORE >> >> -/* 16M alignment for crash kernel regions */ >> -#define CRASH_ALIGN SZ_16M >> - >> /* >> * Keep the crash kernel below this limit. >> * >> @@ -530,7 +527,7 @@ static void __init reserve_crashkernel(void) >> >> start = memblock_find_in_range(crash_base, >> crash_base + crash_size, >> - crash_size, 1 << 20); >> + crash_size, CRASH_ALIGN); >> if (start != crash_base) { >> pr_info("crashkernel reservation failed - memory is in use.\n"); >> return; >> -- >> 2.20.1 >> > Thanks > Dave > > > . > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel