Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7001098ybi; Wed, 5 Jun 2019 09:35:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqx34rWzxV0M/h1p2cpluEQfyit1wkKGK2uWVbTPRImbKyiQWXyzXYhWaLG1kivvT1MB1ovO X-Received: by 2002:a63:dc11:: with SMTP id s17mr5819432pgg.47.1559752505329; Wed, 05 Jun 2019 09:35:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559752505; cv=none; d=google.com; s=arc-20160816; b=U8re/rWBLN6E47bmpc19wOlQf4EM6WWdt0E+oH+NLlSUzlWUOcBfO1qBjsyxYsACd6 kSc6fE+1VrP985StByw1CTLI2mGzZAe9l+z54MdxL7ZGeAXh3zuVIEyfWSrOMsGIOX+y 39tb9/ikX25mCyC4nS38Nlm9tcUHD/M4dr5y9HyQn0eNArp1pXeF8O+56c0lOoKbNHDm 25EQdJjNXf781qbr8UcU9pWwa8sekCZ396tfGsHEe4txkNk9Tc3drWhJgX3vCA5HQQ+6 lxc0qvkObTdNYye19vRivf2UrQQVP4wtF8gVsKSxeI9OM59FaJChJkZDjnvJP2+KUJWH 1znQ== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=fFcZ4SkDo55jbz9mzlNDhFKxa1lrOZkRCiSJNaSqEM8=; b=HqPAN5Y6BKb5md3F4jRsSoqPccLUeeDLT+Mr6R3L7gFFdLMh0x1lSrvjbD1CK3EPfq 6M3gpkuyYwWgWSUnc/zWIraRy6zDc2hLKa35CCbUH8eViYTbVCEtvxOGpIUmuHeV7z7t peAKsbeeGkAV/WD44UTj1BRawWtsHFfDXHKhnbolk1H8oqRS01zT1Ax0rFeHIN0pEHp6 ib4X1L9zChvL1EPqgS3eyR947z48lpSnY910Mu2RKMVCyKadNt268GS581zu2kGOdBbc jofsyB64itD0RGogvExLCQE/MmdIFbPUKbrRb7eKE9qLUXC/mf3hUhnhw0rPAjbPAOX4 Aq4A== 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 q4si28463572pgc.108.2019.06.05.09.34.47; Wed, 05 Jun 2019 09:35:05 -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 S1728764AbfFEQcJ (ORCPT + 99 others); Wed, 5 Jun 2019 12:32:09 -0400 Received: from foss.arm.com ([217.140.101.70]:34638 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726421AbfFEQcI (ORCPT ); Wed, 5 Jun 2019 12:32:08 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8EA8A374; Wed, 5 Jun 2019 09:32:08 -0700 (PDT) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B9ED53F5AF; Wed, 5 Jun 2019 09:32:05 -0700 (PDT) Subject: Re: [PATCH 0/4] support reserving crashkernel above 4G on arm64 kdump To: Chen Zhou Cc: catalin.marinas@arm.com, will.deacon@arm.com, akpm@linux-foundation.org, ard.biesheuvel@linaro.org, rppt@linux.ibm.com, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, ebiederm@xmission.com, horms@verge.net.au, takahiro.akashi@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org, wangkefeng.wang@huawei.com References: <20190507035058.63992-1-chenzhou10@huawei.com> From: James Morse Message-ID: <51995efd-8469-7c15-0d5e-935b63fe2d9f@arm.com> Date: Wed, 5 Jun 2019 17:32:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190507035058.63992-1-chenzhou10@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > 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!) Thanks, James