Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6817438imu; Wed, 30 Jan 2019 23:42:58 -0800 (PST) X-Google-Smtp-Source: ALg8bN7nmxMbSZI7HftM+3YB2HprvOLaB9rFjU+2CkAzcnsC1PKwNl7j1yOrd++XYQ0hom5vkJjL X-Received: by 2002:a62:1d4c:: with SMTP id d73mr34119834pfd.90.1548920578087; Wed, 30 Jan 2019 23:42:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548920578; cv=none; d=google.com; s=arc-20160816; b=Q9ksflHzB36ufNcOHhRhKqInrJzr1pKBHXREsOeGkJot1VD9sAysZok6/WqVjly7aT +Dek53gDx0nJQqJ8Low0ASe9VQiCVRTzb7NtqDm7B+Z3zn6xSoRZf7gpZvvawPOTUTRe yaSc2+jTq3uNtaQzfXArm3tCvkKeAnRPl9xzVO3b+zj6hYfLnIWjB4Wx8T9tiVbd6kub oMWW1gMOZb8/Zz+Vnf3kNlN+uVKVavohzTpvUTLq4I2rqulrOn3pHnj8ccKglkFzvbHJ rwSDF0aQsf4Jja3rfjLnBfoQhtd3+milQGtojIcs+5wG78bGrUYU1x4mn4unoIRF5d4T a4TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9csiCYOsXSvoyykGYy6mKIjvuH6J3JXYyQsbCB6lWYU=; b=OqvZ5eUKhFmVHXnGFXMW876ihBDgz7IjE5mX6vg38D4rW94Wb+cNR2g4Qjya9cxSUR RBUhTLCbMq+MtGTNdEtgzmxDozLK30DXhYbbokZsoLUPjkZomoGLpUUCblC2+DdsPWxJ pz91a89rEzcZDgglanAuUzstjyPzwF6uW7S6TkwR9vZXVMEKSV6GJ6MdChrc/diFXA6i Ey4p+kkH9mBL+0wGnHgug3e1/KKBAmSKjQ13WWKlVy1uqha7dHlrBhVMldGCswNozkRF WqyaiM3GLb7MXthOwvihoHpthT05FDyMuQppklnMqwrDHu2QxmVVMwWFdPgyxvlK5Tqs oyMA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d1si3702945pgg.301.2019.01.30.23.42.43; Wed, 30 Jan 2019 23:42:58 -0800 (PST) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728238AbfAaHmb (ORCPT + 99 others); Thu, 31 Jan 2019 02:42:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41694 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725880AbfAaHmb (ORCPT ); Thu, 31 Jan 2019 02:42:31 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C13B3A0498; Thu, 31 Jan 2019 07:42:30 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-108.pek2.redhat.com [10.72.12.108]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7A26760BF7; Thu, 31 Jan 2019 07:42:25 +0000 (UTC) Date: Thu, 31 Jan 2019 15:42:21 +0800 From: Dave Young To: Pingfan Liu Cc: Borislav Petkov , kexec@lists.infradead.org, Baoquan He , Andrew Morton , Mike Rapoport , Yinghai Lu , vgoyal@redhat.com, Randy Dunlap , x86@kernel.org, LKML Subject: Re: [PATCHv7] x86/kdump: bugfix, make the behavior of crashkernel=X consistent with kaslr Message-ID: <20190131074221.GA19091@dhcp-128-65.nay.redhat.com> References: <1548047768-7656-1-git-send-email-kernelfans@gmail.com> <20190125103924.GB27998@zn.tnic> <20190125134518.GA23595@dhcp-128-65.nay.redhat.com> <20190125140823.GC27998@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 31 Jan 2019 07:42:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/29/19 at 01:25pm, Pingfan Liu wrote: > On Fri, Jan 25, 2019 at 10:08 PM Borislav Petkov wrote: > > > > On Fri, Jan 25, 2019 at 09:45:18PM +0800, Dave Young wrote: > > > AFAIK, some people prefer to explictly reserve crash memory at high > > > region even if it is possible to reserve at low area. May because > > > <4G memory is limited on large server, they want to leave this for other > > > use. > > > > > > Yinghai or Vivek should know more about the history, probably they can > > > recall some initial reason. > > > Go through the git log, and I found the initial introduction of > crashkernel_high option. Refer to > commit 55a20ee7804ab64ac90bcdd4e2868a42829e2784 > Author: Yinghai Lu > Date: Mon Apr 15 22:23:47 2013 -0700 > > x86, kdump: Retore crashkernel= to allocate under 896M > > Vivek found old kexec-tools does not work new kernel anymore. > > So change back crashkernel= back to old behavoir, and add crashkernel_high= > to let user decide if buffer could be above 4G, and also new > kexec-tools will > be needed. > > But kexec-tools-2.0.3, released at 2012, can run 4.20 kernel with > crashkernel=256M@5G, so I think only very old kexec-tools requires > memory under 896M. Due to -1.few people running latest kernel with > very old kexec-tools to date, -2. crashkernel=X is more popular than > crashkernel=X.high, it should be time to eliminate this limit of > crashkernel=X parameter, otherwise we will run into this bug. > As for crashkernel=,high, I think it is a more professional option for > who cares about the DMA32. On high-end machine, big reserved region is > used for crashkernel(e.g. in this case 384M), which make the crowed > situation under under 4GB memory worse. This seems answers the question why ,high is needed and why crashkernel=X can not allocate from high by default. Another reason for this question is for crashkernel=,high, a separate region under 4G is still needed. I searched some history bug/emails, previously the initial commit does not reserve low memory by default if ,high is used, but later Yinghai saw a regression bug in case iommu disabled. see below commit: commit c729de8fcea37a1c444e81857eace12494c804a9 Author: Yinghai Lu Date: Mon Apr 15 22:23:45 2013 -0700 x86, kdump: Set crashkernel_low automatically Chao said that kdump does does work well on his system on 3.8 without extra parameter, even iommu does not work with kdump. And now have to append crashkernel_low=Y in first kernel to make kdump work. We have now modified crashkernel=X to allocate memory beyong 4G (if available) and do not allocate low range for crashkernel if the user does not specify that with crashkernel_low=Y. This causes regression if iommu is not enabled. Without iommu, swiotlb needs to be setup in first 4G and there is no low memory available to second kernel. [snip] > > > Yes, just "prefer" is not good enough. There should be a technical > > reason why that's there. > > > > Also, if the user doesn't care, then the code should be free to force > > "high" and thus probe a different range for allocation. > > > Do you suggest to remove crashkernel=X,high parameter? I do not think it can be removed, because for ,high we also need extra low memory, it will cause confusion, most people are just fine without this. People can choose to use ,high if they really need it. Thanks Dave