Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3624296pxk; Mon, 7 Sep 2020 20:21:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwr9a63o6xXS8CbKgBx6JCNRWWea6MTCxnyl0/fP+rFrYhWCslYPq/S21TGY7UZYN0LgaO/ X-Received: by 2002:a17:906:4cd6:: with SMTP id q22mr23328740ejt.139.1599535286169; Mon, 07 Sep 2020 20:21:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599535286; cv=none; d=google.com; s=arc-20160816; b=ZKUWY7nJzFdTrxePCnzildpEb/oH7q+fGVv0T7tvQF5xR4r4g2lVRnYOV84RvdHnUE eExIdCgV3iKoT0yifQIt6ZHwu0TYvXp4Xb+txP9+bXQ0MFx1YkCnmYzIT1pgrxkKAdVf auFVCd4yA745BNqdJjlqKNCF+n9aacEBEFOkxjBYwVtr3JsB0Ht/EaV90lbjQEqVSlFx 3MTgiepnO5FN27mkNjWCGmlje8jG8S8kt3E/OcAw0aiPNJQFFmnPRAVr4qSOCg5m3Utz jUzKX5IY8u8xIta7affSzJEhhJfY4T3yQMp6LERAQMERGdudq4Cp72FI/nIkmrEAFiJY Q0vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject; bh=NHm8s70nw16AYRr3p4+69OLqi+E6muQ7BC8d2Uabv5c=; b=phBd24L4EWHLl6DE1Z2n23yCAXoYB39ARDug++5mfJ0AUxdc+XKYWlOnKcG9GJzRsG I5id06oehmUOJsb+6gQTCLuDNgmjW0vHPkexQYEvm3SBcBub/jVnJ2md+a3O38uxtUVs t9b82IkmH4poXVM/aGmV+NpZxwWC2kWgKZK8r/SWN8QC8sBmKwjeL4JX2do42fYDL+KN Mc9q3okCzdy+u0Bl1jrqgmVWa+NZ6n9ZeZjMdYC40akMYvKDMeN4zR0aZ6W4pfKG+enH 7kIm/bL0Y3E59pogpjp6b7eyklSVT9k6iIC/rBnqCBWGyhwv3F9DkQSkEOYH7Gj/Ql/d 2Mdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s22si10477709edc.481.2020.09.07.20.21.04; Mon, 07 Sep 2020 20:21:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728452AbgIHDTz (ORCPT + 99 others); Mon, 7 Sep 2020 23:19:55 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:55430 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728417AbgIHDTz (ORCPT ); Mon, 7 Sep 2020 23:19:55 -0400 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> CC: , , , , , , , , , , , , , , , , , , , , , 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> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.176.220] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 > > > . >