Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1783468imm; Thu, 24 May 2018 00:27:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpCIc8FMZ8nz+/XfLUAcyqF8PbuOLi058fmfhZhDRUoI5kwFKpuWz+5dAb5Q1kstdnG/FwZ X-Received: by 2002:a17:902:5309:: with SMTP id b9-v6mr6255338pli.187.1527146839409; Thu, 24 May 2018 00:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527146839; cv=none; d=google.com; s=arc-20160816; b=mphsbLXe+6CABOfxeaQn5ptHMolCULfDn6ppgZH7uVJmLGB5u2R1bRQEEKplVGnn2x /yGcM+ccixoS2cSJDhFxDPQWfdvrHPRxX4d4n1NENpXLylgFCVFkTbrnEFtGcNXjIVvk dN1aFaR5tIyyXfZRow5rkkrx4EZSA/TT+zqUjWB/F+F9LzbPQIs+iFVGO9p6kg855XB6 Kb52SaIKelYyg264W/ZCyoDu0ItBEL69TVN2j1KLON73AUYrLUMXOmUS2M3ppXwW2nQX OVPGHCiibHG8seUpIL4ZmNixFw0VZ2NaD+s2kHIRx7fm1MMuhNjF8w1sMeb1sWHenfC9 wirA== 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:arc-authentication-results; bh=p+z0R0dIEypO39QUHVsZ4SU1qdsXG7BduA6hVf62eks=; b=cWIUW1z0vA1PvRJ7a6cB20MeCFHDZH+aJ2EMx3T/6o5ZZ5BLTHS6P2um6s1N/+0yiC QA7s0OvQCTUc+1O4mXp9vjS3eMFHmHM2Xpk54nbC5qNT1WXDMhdHPP1xrHz9Mt2iJyi/ xgegCMeJ91RPrEFqaxhAlpvmVgUtbGE1ERO/OIq16kdoH1FboINJVviN3qUB1HeHENAv /g6/yxq5ar6gG2mK+dde/v3ryQmju3IS3X+kZI0ndGCg9TqdkzsywL3Vo2UAqNB2g2mj s/00z53fHzENtwtVVHLcyxjkV4LVgU5zisF4PAGqi+ElKLi2wabpOciCq1aqowYvgsn+ 8Trg== 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 j2-v6si16576599pgc.350.2018.05.24.00.27.04; Thu, 24 May 2018 00:27:19 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965004AbeEXH0k (ORCPT + 99 others); Thu, 24 May 2018 03:26:40 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35138 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S964789AbeEXH0j (ORCPT ); Thu, 24 May 2018 03:26:39 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EB027401EF00; Thu, 24 May 2018 07:26:38 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-77.pek2.redhat.com [10.72.12.77]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D0C92026DEF; Thu, 24 May 2018 07:26:31 +0000 (UTC) Date: Thu, 24 May 2018 15:26:27 +0800 From: Dave Young To: Petr Tesarik Cc: dzickus@redhat.com, Neil Horman , Tony Luck , bhe@redhat.com, Michael Ellerman , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Schwidefsky , "Eric W. Biederman" , Benjamin Herrenschmidt , Hari Bathini , Cong Wang , Andrew Morton , Ingo Molnar , Vivek Goyal Subject: Re: [PATCH] kdump: add default crashkernel reserve kernel config options Message-ID: <20180524072627.GA1940@dhcp-128-65.nay.redhat.com> References: <20180521025337.GA4627@dhcp-128-65.nay.redhat.com> <20180521120215.117d963a7619eb0d1f54bced@linux-foundation.org> <20180523070641.GA1689@dhcp-128-65.nay.redhat.com> <877enucqr0.fsf@xmission.com> <20180523222236.5a96732e@ezekiel.suse.cz> <20180524014905.GB2031@dhcp-128-65.nay.redhat.com> <20180524085708.31aa311d@ezekiel.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180524085708.31aa311d@ezekiel.suse.cz> User-Agent: Mutt/1.9.5 (2018-04-13) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 24 May 2018 07:26:39 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 24 May 2018 07:26:39 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'dyoung@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/24/18 at 08:57am, Petr Tesarik wrote: > On Thu, 24 May 2018 09:49:05 +0800 > Dave Young wrote: > > > Hi Petr, > > > > On 05/23/18 at 10:22pm, Petr Tesarik wrote: > >[...] > > > In short, if one size fits none, what good is it to hardcode that "one > > > size" into the kernel image? > > > > I agreed with all the things that we can not know the exact memory > > requirement for 100% use cases. But that does not means this is useless > > it is still useful for common use cases of no special and memory hog > > requirements as I mentioned in another reply it can simplify the kdump > > deployment for those people who do not need the special setup. > > I still tend to disagree. This "common-case" reservation depends on > things that are defined by user space. It surely does not make it > easier to build a distribution kernel. Today, I get bug reports that > the number calculated and added to the boot loader configuration by the > installer is inaccurate. If I put a fixed number into a kernel config > option, I will start getting bugs that this number is incorrect (for > some systems). The value is a best effort, it will never be 100% correct. We did not guarantee that. The kernel config option value is just up to user. So I'm thinking it as a good to have benefit. > > > For example, if this is a workstation I just want to break into a shell > > to collect some panic info, then I just need a very minimal initrd, then > > the Kconfig will work just fine. > > What is "a very minimal initrd"? Last time I had to make a significant > adjustment to the estimation for openSUSE, this was caused by growing > user-space requirements (systemd in this case, but I don't want to > start flamewars on that topic, please). Still I think we have agreement and same feeling about the userspace memory requirement. I think although it is hard, we have been still trying to shrink the initramfs memory use. Besides of distribution use, why people can not use some minimal initrd? For example only a basic shell and some necessary tools and basic storage eg. raw disks supported, and he/she can just collect the panic infomation by himself in a shell. > > Anyway, if you want to improve the "common case", then look how IBM > tries to solve it for firmware-assisted dump (fadump) on powerpc: > > https://patchwork.ozlabs.org/patch/905026/ > > The main idea is: > > > Instead of setting aside a significant chunk of memory nobody can use, > > [...] reserve a significant chunk of memory that the kernel is prevented > > from using [...], but applications are free to use it. > > That works great, because user space pages are filtered out in the > common case, so they can be used freely by the panic kernel. Good suggestion. I have been reading that posts already at the same time before I saw this reply from you :) That could be a good idea and worth to discuss more. I cced Hari already in the thread. Hari, is it possible for you to extend your idea to general use, ie. shared by both kdump and fadump? Anyway I think that is another topic we can discuss separately. > > Just my two cents, > Petr T Thanks Dave