Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1798639imm; Thu, 24 May 2018 00:45:41 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoRlW2CjgGNgHtGl3tluU1cVtXOOvXuAsaly4yNqNMEpVBHBND64ORc5YVOvxeezZMpjoek X-Received: by 2002:a65:4887:: with SMTP id n7-v6mr5018262pgs.215.1527147941214; Thu, 24 May 2018 00:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527147941; cv=none; d=google.com; s=arc-20160816; b=XCg5USDS4BdveghW2zul4DP35Kbm7GFL9U8usDMXq5aYb+Ns9+7r78gJ4FSQpi6kC6 MqvmXyGkzmzqtBFCRA7aGN9vfRwgldY/+6J3cOSu2OWlQJmdNZkAUM77rYqCi6zcFiZK +feAWO1w1CYVICMdQ4UZGMDp0FZ3oFiFC3Nl6pZCmqq+YWvkueB/N4YdtLn+eMR747xk J0rj17/FiIPTdiJe8YRBzbW01tK1N5baK0S63JezHPZ497xEJiqVZibDKUtozZzFJJy7 4SaB/Qt4t85FHz+dbfodZQ61WtKHsypDgC3ivdG8vLsmWkuztJHL2N8PjP4kyO8eC/qU FBAQ== 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=H0Kbe7sanNHEHBNARNJRkncbyHJMSjcKRurjlp2Ene0=; b=wBjEdVLgJVy+keil6L6nv2se/Y+Vv94Q+ueSqCEU0HkFJFOYzW92dg27lZwSel6sgR 01a8C1wrmXu7mI03HzAVZVZkvExI/KIZJQPGdS2Ql5DLkXGFIQTYuX5ZA5S1PfSynSaB 6gqbouX3voQZbcBfJwupB7zpOpo8nERW8uT/c8iMd62HDbQAeGk1y6fG8xzn9Nao/o6d 0o7uP/wRxKQ+KzEeLZaF5oL2gu13gK3l4YTPHTCSYbVmQhH0VpJrGnJzRpEFg5sDZw4v VnTpPqLI1oG0wN8dhz86hNPS9N3oBe+0tUbbtoSkMcu+GWoJQnMx5pq8yQ2PlWEo+fsE 9k+w== 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 5-v6si20529664pfd.73.2018.05.24.00.45.26; Thu, 24 May 2018 00:45:41 -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 S965117AbeEXHj2 (ORCPT + 99 others); Thu, 24 May 2018 03:39:28 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43972 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935641AbeEXHj0 (ORCPT ); Thu, 24 May 2018 03:39:26 -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 95A77402178A; Thu, 24 May 2018 07:39:25 +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 98E2B2026DEF; Thu, 24 May 2018 07:39:19 +0000 (UTC) Date: Thu, 24 May 2018 15:39:15 +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: <20180524073915.GB1940@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> <20180524072627.GA1940@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180524072627.GA1940@dhcp-128-65.nay.redhat.com> 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.7]); Thu, 24 May 2018 07:39:25 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Thu, 24 May 2018 07:39:25 +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 03:26pm, Dave Young wrote: > 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. I means this patch is not trying to force add a fixed value for crashkernel in kernel code. It provides another way one can use on kernel build time the value just works. > > > > > > 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