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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 13E8BC28CC5 for ; Mon, 3 Jun 2019 02:24:26 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CD3F427AD9 for ; Mon, 3 Jun 2019 02:24:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CD3F427AD9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5ECF66B000A; Sun, 2 Jun 2019 22:24:25 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 59D116B000C; Sun, 2 Jun 2019 22:24:25 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 48C506B000D; Sun, 2 Jun 2019 22:24:25 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) by kanga.kvack.org (Postfix) with ESMTP id 1B7DA6B000A for ; Sun, 2 Jun 2019 22:24:25 -0400 (EDT) Received: by mail-oi1-f198.google.com with SMTP id a126so1516881oif.16 for ; Sun, 02 Jun 2019 19:24:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:to :references:cc:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=6dqumrUjjkD4kvBVGhI8idjvNml/o2RCOOarcFXFswo=; b=n4lqF7u7+X/dlooKWCNwhf8ySKeOsjOI3Yg43UvZI9QI0DDR3WsQEHHEAsxmexYGso PV0Z79ol1ztcMpBYhv7GPEzuGrBI6Tts3gl3tW5ff+xylt8jgQkfZhcHZywYFBNEY8Bz VKBWnqiTJ8AYGsHgHCtzDDR3Cll3XCIvEltOcm4mSp59dtBkKBlq33gzcwdMUBb3B0yC xvcw4pImOcSOTLXynl83Kp3OTMNWxjwq1mV54irI45sX2ajVT1InaVXEwyyElguklv6N GkKtuOyQCvnOsFcpLg7SS2bLrIeKFobzdueHFmBafpzcY3LhV/stNzvYDbbMdAGl8aWY xNJw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of chenzhou10@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=chenzhou10@huawei.com X-Gm-Message-State: APjAAAUqgIVdUkT88hLVgKilmLCxLkgp6fFvaAfP27jPVoYjdkzVS7PA L5vZhDA7ZVqPrgb7X83mg/h6Gdb+gzGHHuZJ6n7NJkP8S/BNKsru1FJ/i5jbPSIww8tru1xvD0r iSmtOsa7Ndi8xWlOxejXubVyyiQXpyAYY5GEK+aGvNbQV5M5iBoaJmD0NJmEfyvQ/dA== X-Received: by 2002:a9d:70d3:: with SMTP id w19mr755801otj.208.1559528664519; Sun, 02 Jun 2019 19:24:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqynjbtyjmWVi6XyGqOFlAfJ5YEgIihKQhrrJOtoLC7ovxLsffByrDRAbaTU1u231Ps83Dqp X-Received: by 2002:a9d:70d3:: with SMTP id w19mr755776otj.208.1559528663622; Sun, 02 Jun 2019 19:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559528663; cv=none; d=google.com; s=arc-20160816; b=WkJPIB9H2E+Wdn3AVMeKTyJjuZVMrfa5MeYikOuP3h3XGoeEaitcT9Z0OffywwgSsW yE2AkwgDZ4sIyBrv6Csut37z9/B0SZ4eF8zSI3964lX3qfu9hMD7q86F9LhLqh/AusUo DtAyVgmEtyHht95Q3JiiH86N0xYv27NJpiZo7K+2/eqXaflYfxh3+PhdjpvHo/5JMEdR EeQ2j6xvJLr878khAIT8hEq+3qM8UaiUPgQfE7uBFbrIq1YKRinD6H06keDzVohxvuPu cLta5LQypBYDvpGgUnpPC4SWBfNQNxaCf0IqtwEFRLiGcveuLt3H55Vh6N7Q8FPw5Tbj I9sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject; bh=6dqumrUjjkD4kvBVGhI8idjvNml/o2RCOOarcFXFswo=; b=dooV32dzjw+2EhgReqztwsl9NEdJOvagQaCiXBZOVtsGysoajLr85KAeXqHNmXGMDt ks1VGIVMVvSduvt+xia9MU+sD2rwSxHLqIQumD/1fOYKovT8TlIXa8F+om/D4Hazv4/B J79HKJMKKZsCU2NJWdSkZVJc2KAIlpDkvfzXe7biKIIYoXCiGnKh+IgEB/kWBj8MdaNo iyXPWPNdhEvd7+kFgkx4Lnfc9AxTcj8dSmXSppb1aJZEAoKrTHpQOUFn/70cBWpB0Apw +RnjSPiHE2G1300TaMvlpIlyGw59rTLwaAMrZYqxsqcn8dmsCxIcrlU+UTp9aXBoEU/y v/0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of chenzhou10@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=chenzhou10@huawei.com Received: from huawei.com (szxga06-in.huawei.com. [45.249.212.32]) by mx.google.com with ESMTPS id u26si2752478oiv.61.2019.06.02.19.24.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Jun 2019 19:24:23 -0700 (PDT) Received-SPF: pass (google.com: domain of chenzhou10@huawei.com designates 45.249.212.32 as permitted sender) client-ip=45.249.212.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of chenzhou10@huawei.com designates 45.249.212.32 as permitted sender) smtp.mailfrom=chenzhou10@huawei.com Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 108B9137E52AEBD42766; Mon, 3 Jun 2019 10:24:19 +0800 (CST) Received: from [127.0.0.1] (10.177.131.64) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Mon, 3 Jun 2019 10:24:08 +0800 Subject: Re: [PATCH 0/4] support reserving crashkernel above 4G on arm64 kdump To: Bhupesh Sharma , , , , , , , , , References: <20190507035058.63992-1-chenzhou10@huawei.com> CC: , , , , , , , Bhupesh SHARMA From: Chen Zhou Message-ID: <1567962e-f60b-60c2-1f73-10e07377be1e@huawei.com> Date: Mon, 3 Jun 2019 10:24:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.131.64] X-CFilter-Loop: Reflected X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi Catalin, Sorry to ping you. What's your suggestion about this patch series? I am looking forward to your replay. Thanks, Chen Zhou On 2019/5/16 11:19, Chen Zhou wrote: > Hi Bhupesh, > > On 2019/5/15 13:06, Bhupesh Sharma wrote: >> +Cc kexec-list. >> >> Hi Chen, >> >> I think we are still in the quiet period of the merge cycle, but this is a change which will be useful for systems like HPE Apollo where we are looking at reserving crashkernel across a larger range. >> >> Some comments inline and in respective patch threads.. >> >> On 05/07/2019 09:20 AM, Chen Zhou wrote: >>> This patch series enable reserving crashkernel on high memory in arm64. >> >> Please fix the patch subject, it should be v5. >> Also please Cc the kexec-list (kexec@lists.infradead.org) for future versions to allow wider review of the patchset. >> >>> We use crashkernel=X to reserve crashkernel below 4G, which will fail >>> when there is no enough memory. Currently, crashkernel=Y@X can be used >>> to reserve crashkernel above 4G, in this case, if swiotlb or DMA buffers >>> are requierd, capture kernel will boot failure because of no low memory. >> >> ... ^^ required >> >> s/capture kernel will boot failure because of no low memory./capture kernel boot will fail because there is no low memory available for allocation. >> >>> When crashkernel is reserved above 4G in memory, kernel should reserve >>> some amount of low memory for swiotlb and some DMA buffers. So there may >>> be two crash kernel regions, one is below 4G, the other is above 4G. Then >>> Crash dump kernel reads more than one crash kernel regions via a dtb >>> property under node /chosen, >>> linux,usable-memory-range = . >> >> Please use consistent naming for the second kernel, better to use crash dump kernel. >> >> I have tested this on my HPE Apollo machine and with crashkernel=886M,high syntax, I can get the board to reserve a larger memory range for the crashkernel (i.e. 886M): >> >> # dmesg | grep -i crash >> [ 0.000000] kexec_core: Reserving 256MB of low memory at 3560MB for crashkernel (System low RAM: 2029MB) >> [ 0.000000] crashkernel reserved: 0x0000000bc5a00000 - 0x0000000bfd000000 (886 MB) >> >> kexec/kdump can also work also work fine on the board. >> >> So, with the changes suggested in this cover letter and individual patches, please feel free to add: >> >> Reviewed-and-Tested-by: Bhupesh Sharma >> >> Thanks, >> Bhupesh >> > > Thanks for you review and test. I will fix these later. > > Thanks, > Chen Zhou > >>> Besides, we need to modify kexec-tools: >>> arm64: support more than one crash kernel regions(see [1]) >>> >>> I post this patch series about one month ago. The previous changes and >>> discussions can be retrived from: >>> >>> Changes since [v4] >>> - reimplement memblock_cap_memory_ranges for multiple ranges by Mike. >>> >>> Changes since [v3] >>> - Add memblock_cap_memory_ranges back for multiple ranges. >>> - Fix some compiling warnings. >>> >>> Changes since [v2] >>> - Split patch "arm64: kdump: support reserving crashkernel above 4G" as >>> two. Put "move reserve_crashkernel_low() into kexec_core.c" in a separate >>> patch. >>> >>> Changes since [v1]: >>> - Move common reserve_crashkernel_low() code into kernel/kexec_core.c. >>> - Remove memblock_cap_memory_ranges() i added in v1 and implement that >>> in fdt_enforce_memory_region(). >>> There are at most two crash kernel regions, for two crash kernel regions >>> case, we cap the memory range [min(regs[*].start), max(regs[*].end)] >>> and then remove the memory range in the middle. >>> >>> [1]: http://lists.infradead.org/pipermail/kexec/2019-April/022792.html >>> [v1]: https://lkml.org/lkml/2019/4/2/1174 >>> [v2]: https://lkml.org/lkml/2019/4/9/86 >>> [v3]: https://lkml.org/lkml/2019/4/9/306 >>> [v4]: https://lkml.org/lkml/2019/4/15/273 >>> >>> Chen Zhou (3): >>> x86: kdump: move reserve_crashkernel_low() into kexec_core.c >>> arm64: kdump: support reserving crashkernel above 4G >>> kdump: update Documentation about crashkernel on arm64 >>> >>> Mike Rapoport (1): >>> memblock: extend memblock_cap_memory_range to multiple ranges >>> >>> Documentation/admin-guide/kernel-parameters.txt | 6 +-- >>> arch/arm64/include/asm/kexec.h | 3 ++ >>> arch/arm64/kernel/setup.c | 3 ++ >>> arch/arm64/mm/init.c | 72 +++++++++++++++++++------ >>> arch/x86/include/asm/kexec.h | 3 ++ >>> arch/x86/kernel/setup.c | 66 +++-------------------- >>> include/linux/kexec.h | 5 ++ >>> include/linux/memblock.h | 2 +- >>> kernel/kexec_core.c | 56 +++++++++++++++++++ >>> mm/memblock.c | 44 +++++++-------- >>> 10 files changed, 157 insertions(+), 103 deletions(-) >>> >> >> >> . >> > > > . >