From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79F7EC433ED for ; Mon, 10 May 2021 11:45:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id E054D611C2 for ; Mon, 10 May 2021 11:45:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E054D611C2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 20EA86B0070; Mon, 10 May 2021 07:45:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1BE716B0071; Mon, 10 May 2021 07:45:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 00F936B0072; Mon, 10 May 2021 07:45:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id D2A736B0070 for ; Mon, 10 May 2021 07:45:20 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 88DFA8249980 for ; Mon, 10 May 2021 11:45:20 +0000 (UTC) X-FDA: 78125140800.24.FFD0FCC Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf20.hostedemail.com (Postfix) with ESMTP id 63885DD for ; Mon, 10 May 2021 11:45:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620647119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wrnGfWAQo+AfggW4TAXOXcPiZDtGK94s7LE3HMGzzZA=; b=LyHZ+uZiMz3z4lbbMg63IZk77PVzhtNN+rJpDLAOLWl5Hb5teRcqxmRTyJcBLEz27bs0OB TLqhvfmQWgGC/fcoYNz75WVqNBPSzAggkORohJ0ospN+FoZhkGzuoKeUb20v0XLBWnMvW7 pioWQ9RqvaH9vZSMpAhyqlsJ15/WJMg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-311-ml_NmExAPqub_pU6sVFq8w-1; Mon, 10 May 2021 07:45:15 -0400 X-MC-Unique: ml_NmExAPqub_pU6sVFq8w-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C991364157; Mon, 10 May 2021 11:45:10 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-168.pek2.redhat.com [10.72.12.168]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C3C125D9CA; Mon, 10 May 2021 11:44:54 +0000 (UTC) Date: Mon, 10 May 2021 19:44:50 +0800 From: Dave Young To: David Hildenbrand Cc: Baoquan He , Andrew Morton , andreyknvl@google.com, christian.brauner@ubuntu.com, colin.king@canonical.com, corbet@lwn.net, frederic@kernel.org, gpiccoli@canonical.com, john.p.donnelly@oracle.com, jpoimboe@redhat.com, keescook@chromium.org, linux-mm@kvack.org, masahiroy@kernel.org, mchehab+huawei@kernel.org, mike.kravetz@oracle.com, mingo@kernel.org, mm-commits@vger.kernel.org, paulmck@kernel.org, peterz@infradead.org, rdunlap@infradead.org, rostedt@goodmis.org, rppt@kernel.org, saeed.mirzamohammadi@oracle.com, samitolvanen@google.com, sboyd@kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, vgoyal@redhat.com, yifeifz2@illinois.edu, Michal Hocko Subject: Re: [patch 48/91] kernel/crash_core: add crashkernel=auto for vmcore creation Message-ID: References: <20210507010432.IN24PudKT%akpm@linux-foundation.org> <889c6b90-7335-71ce-c955-3596e6ac7c5a@redhat.com> <20210508085133.GA2946@localhost.localdomain> <2d0f53d9-51ca-da57-95a3-583dc81f35ef@redhat.com> <20210510045338.GB2946@localhost.localdomain> <4a544493-0622-ac6d-f14b-fb338e33b25e@redhat.com> <20210510104359.GC2946@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 63885DD Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=LyHZ+uZi; dmarc=pass (policy=none) header.from=redhat.com; spf=none (imf20.hostedemail.com: domain of dyoung@redhat.com has no SPF policy when checking 216.205.24.124) smtp.mailfrom=dyoung@redhat.com X-Stat-Signature: kmdm5d3nddrjizqtn9zzso8qmsgp5e5t Received-SPF: none (redhat.com>: No applicable sender policy available) receiver=imf20; identity=mailfrom; envelope-from=""; helo=us-smtp-delivery-124.mimecast.com; client-ip=216.205.24.124 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1620647119-398812 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Hi David, On 05/10/21 at 01:01pm, David Hildenbrand wrote: [snip] > It also bugged me for quite a bit that we don't have a sane way to achieve > what we're doing here upstream. It somewhat feels like "this doesn't belong > in the kernel and is user policy" but then, the existing kernel support is > suboptimal. > > Maybe reserving some "maybe too big but okayish to boot the system in a sane > environment -- e.g., X% of system RAM and at least Y" size first and > shrinking it later as triggered by user space early (where we do seem to > have a way to pre-calculate things now) might actually be a good direction > to look into. Hmm, that is also an option we considered before. Even for your suggestion we still need a kernel option to set the default ratio/value. and the ratio/value should be another patch which expands crashkernel syntax. Actually the kconfig help text in this patch is indeed misleading, it is not introducing crashkernel=a:b... and no need to explain about the crashkernel syntax, the config option is actually just some interface we can add any valid crashkernel settings to be used by default. So current patch help text describes the default value of crash auto str, instead of describes what crash auto str is. And crashkernel=auto makes this more flexibly. We can tune the values easily when upgrading. But if we pass a fixed value in userspace we can not know if the value is set by distribution automatically or by user manually thus we can not blindly update it. Thanks Dave