Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7035564ybi; Thu, 13 Jun 2019 08:29:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqx1qQ6Pnddh7rjJ+wFPZYACtre5HxLKQAMvx11vlB9QKH83IQbHcka1Z/YZRrXQGshLvauq X-Received: by 2002:a62:e20a:: with SMTP id a10mr8441207pfi.64.1560439793042; Thu, 13 Jun 2019 08:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560439793; cv=none; d=google.com; s=arc-20160816; b=YUE1sfpYUQLHiWRQGHDTYzOYEBi3aq3K3h5xTIFe/ysOPnFYKdpoz4VQqNFelOSApm VzQTUHmRB3MMRT3YxrQV/V7EpwytLwAZp1wI0NzWvH5QTL+PH0vym9uJ91mgstFSnPLC FN2ky7K7S7VqydeCqw8fS26IPoRF+2z3Rd1IvOKz06jsB1tRNC2EUG1fiWZ5vwdQgxVQ FNai2kn3nBzMeDf1zH0RqXjU4o5eluKIZ2jtAyWgruez/we4lMie5adc1pqaCxwFtCu+ 37hNuDKXIauhBx6iuzMSWF8nd1Ekt6b1lsMNrdkDOxl5qqroOefj+tQqpKyC98FJ1sWk 1+Rg== 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=/qpDQQVjcxZb5/ubb8japavI83P+cCtsP2OLrvnrPsk=; b=Bu7OwNDJ6cNiN3aZ+bNe/CZmZcVL6Xsx5RScvBmsO2LBuZIA612LrOafsAjrbdECZS krh8zgxQhHBCJAtI+XW6Y3MaLDPWgp1YbTlOYRk3QYUY4gdiLj1dEsG/Rb7zKuYVsKp1 8Jzc+3QT+7jkgmuQtY0UF8VNReS+KPKwqYGM+/uLT75yod+8GjNE67rXyB9yejs4Yv/P q+1DmBsn/WUw38S7FNfOOd9Ott1RIgRIBO1kVo3IeM8mk1oeNlEMXj48qdXqu6J5Bk1k KpSGiSwIXzWwy6Ikki98/ouOcrzAIz39N1b8xmokaz7yP+qxn4H9IYEArsDnpKXAlPc0 lx4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a10si55667pgq.194.2019.06.13.08.29.37; Thu, 13 Jun 2019 08:29:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728145AbfFMP2n (ORCPT + 99 others); Thu, 13 Jun 2019 11:28:43 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:18165 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728927AbfFML2I (ORCPT ); Thu, 13 Jun 2019 07:28:08 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 6D86DE8FDE300608686F; Thu, 13 Jun 2019 19:27:48 +0800 (CST) Received: from [127.0.0.1] (10.177.131.64) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Thu, 13 Jun 2019 19:27:43 +0800 Subject: Re: [PATCH 0/4] support reserving crashkernel above 4G on arm64 kdump To: James Morse References: <20190507035058.63992-1-chenzhou10@huawei.com> <51995efd-8469-7c15-0d5e-935b63fe2d9f@arm.com> CC: , , , , , , , , , , , , , , , From: Chen Zhou Message-ID: <638a5d22-8d51-8d63-2d8a-a38bbb8fb1d6@huawei.com> Date: Thu, 13 Jun 2019 19:27:40 +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: <51995efd-8469-7c15-0d5e-935b63fe2d9f@arm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.131.64] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/6/6 0:32, James Morse wrote: > Hi! > > On 07/05/2019 04:50, Chen Zhou wrote: >> 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. > >> 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. > > This is a good argument for supporting the 'crashkernel=...,low' version. > What is the 'crashkernel=...,high' version for? > > Wouldn't it be simpler to relax the ARCH_LOW_ADDRESS_LIMIT if we see 'crashkernel=...,low' > in the kernel cmdline? > > I don't see what the 'crashkernel=...,high' variant is giving us, it just complicates the > flow of reserve_crashkernel(). > > If we called reserve_crashkernel_low() at the beginning of reserve_crashkernel() we could > use crashk_low_res.end to change some limit variable from ARCH_LOW_ADDRESS_LIMIT to > memblock_end_of_DRAM(). > I think this is a simpler change that gives you what you want. According to your suggestions, we should do like this: 1. call reserve_crashkernel_low() at the beginning of reserve_crashkernel() 2. mark the low region as 'nomap' 3. use crashk_low_res.end to change some limit variable from ARCH_LOW_ADDRESS_LIMIT to memblock_end_of_DRAM() 4. rename crashk_low_res as "Crash kernel (low)" for arm64 5. add an 'linux,low-memory-range' node in DT Do i understand correctly? > > >> Then >> Crash dump kernel reads more than one crash kernel regions via a dtb >> property under node /chosen, >> linux,usable-memory-range = . > > Won't this break if your kdump kernel doesn't know what the extra parameters are? > Or if it expects two ranges, but only gets one? These DT properties should be treated as > ABI between kernel versions, we can't really change it like this. > > I think the 'low' region is an optional-extra, that is never mapped by the first kernel. I > think the simplest thing to do is to add an 'linux,low-memory-range' that we > memblock_add() after memblock_cap_memory_range() has been called. > If its missing, or the new kernel doesn't know what its for, everything keeps working. > > >> 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: > > Ah, this wasn't obvious as you've stopped numbering the series. Please label the next one > 'v6' so that we can describe this as 'v5'. (duplicate numbering would be even more confusing!) > ok. > > Thanks, > > James > > . > Thanks, Chen Zhou