From: Baoquan He <bhe@redhat.com>
To: Saeed Mirzamohammadi <saeed.mirzamohammadi@oracle.com>,
Kairui Song <kasong@redhat.com>
Cc: linux-doc@vger.kernel.org,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Christian Brauner <christian.brauner@ubuntu.com>,
Ingo Molnar <mingo@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
Masahiro Yamada <masahiroy@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>,
Dave Young <dyoung@redhat.com>, Vivek Goyal <vgoyal@redhat.com>,
John Donnelly <john.p.donnelly@oracle.com>,
Kees Cook <keescook@chromium.org>,
"Paul E. McKenney" <paulmck@kernel.org>,
Andrey Konovalov <andreyknvl@google.com>,
Frederic Weisbecker <frederic@kernel.org>,
"Guilherme G. Piccoli" <gpiccoli@canonical.com>,
"Steven Rostedt (VMware)" <rostedt@goodmis.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Stephen Boyd <sboyd@kernel.org>,
Randy Dunlap <rdunlap@infradead.org>,
kexec@lists.infradead.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
YiFei Zhu <yifeifz2@illinois.edu>,
Andrew Morton <akpm@linux-foundation.org>,
Mike Rapoport <rppt@kernel.org>,
Mike Kravetz <mike.kravetz@oracle.com>
Subject: Re: [PATCH v3 1/1] kernel/crash_core: Add crashkernel=auto for vmcore creation
Date: Tue, 23 Feb 2021 21:56:05 +0800 [thread overview]
Message-ID: <20210223135605.GA3553@MiWiFi-R3L-srv> (raw)
In-Reply-To: <CACPcB9d7-kJR7OG2OrLcAhFhiMO26PB82Uv9bK9FkCfH__zWZQ@mail.gmail.com>
On 02/23/21 at 08:01pm, Kairui Song wrote:
> On Thu, Feb 18, 2021 at 10:03 AM Baoquan He <bhe@redhat.com> wrote:
> >
> > On 02/11/21 at 10:08am, Saeed Mirzamohammadi wrote:
...
> > > diff --git a/arch/Kconfig b/arch/Kconfig
> > > index af14a567b493..f87c88ffa2f8 100644
> > > --- a/arch/Kconfig
> > > +++ b/arch/Kconfig
> > > @@ -14,6 +14,30 @@ menu "General architecture-dependent options"
> > > config CRASH_CORE
> > > bool
> > >
> > > +if CRASH_CORE
> > > +
> > > +config CRASH_AUTO_STR
> > > + string "Memory reserved for crash kernel"
> > > + depends on CRASH_CORE
> > > + default "1G-64G:128M,64G-1T:256M,1T-:512M"
> > > + help
> > > + This configures the reserved memory dependent
> > > + on the value of System RAM. The syntax is:
> > > + crashkernel=<range1>:<size1>[,<range2>:<size2>,...][@offset]
> > > + range=start-[end]
> > > +
> > > + For example:
> > > + crashkernel=512M-2G:64M,2G-:128M
> > > +
> > > + This would mean:
> > > +
> > > + 1) if the RAM is smaller than 512M, then don't reserve anything
> > > + (this is the "rescue" case)
> > > + 2) if the RAM size is between 512M and 2G (exclusive), then reserve 64M
> > > + 3) if the RAM size is larger than 2G, then reserve 128M
> > > +
> > > +endif # CRASH_CORE
> >
> > Wondering if this CRASH_CORE ifdeffery is a little redundent here
> > since CRASH_CORE dependency has been added. Except of this, I like this
> > patch. As we discussed in private threads, we can try to push it into
> > mainline and continue improving later.
> >
>
> I believe "if CRASH_CORE" is not needed as it already "depends on
> CRASH_CORE", tested with CRASH_CORE=y or 'not set', it just works.
Thanks for testing and confirmation, Kairui.
Saeed, can you post a v4 with CRASH_CORE ifdeffery removed? Maybe this
week?
Thanks
Baoquan
>
> > > +
> > > config KEXEC_CORE
> > > select CRASH_CORE
> > > bool
> > > diff --git a/kernel/crash_core.c b/kernel/crash_core.c
> > > index 106e4500fd53..ab0a2b4b1ffa 100644
> > > --- a/kernel/crash_core.c
> > > +++ b/kernel/crash_core.c
> > > @@ -7,6 +7,7 @@
> > > #include <linux/crash_core.h>
> > > #include <linux/utsname.h>
> > > #include <linux/vmalloc.h>
> > > +#include <linux/kexec.h>
> > >
> > > #include <asm/page.h>
> > > #include <asm/sections.h>
> > > @@ -250,6 +251,12 @@ static int __init __parse_crashkernel(char *cmdline,
> > > if (suffix)
> > > return parse_crashkernel_suffix(ck_cmdline, crash_size,
> > > suffix);
> > > +#ifdef CONFIG_CRASH_AUTO_STR
> > > + if (strncmp(ck_cmdline, "auto", 4) == 0) {
> > > + ck_cmdline = CONFIG_CRASH_AUTO_STR;
> > > + pr_info("Using crashkernel=auto, the size chosen is a best effort estimation.\n");
> > > + }
> > > +#endif
> > > /*
> > > * if the commandline contains a ':', then that's the extended
> > > * syntax -- if not, it must be the classic syntax
> > > --
> > > 2.27.0
> > >
> >
> >
> > _______________________________________________
> > kexec mailing list
> > kexec@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
> >
>
>
> --
> Best Regards,
> Kairui Song
>
next prev parent reply other threads:[~2021-02-23 13:58 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 18:08 [PATCH v3 1/1] kernel/crash_core: Add crashkernel=auto for vmcore creation Saeed Mirzamohammadi
2021-02-17 18:40 ` john.p.donnelly
2021-02-17 19:26 ` Steven Rostedt
2021-02-17 19:42 ` Vivek Goyal
2021-02-18 1:29 ` Dave Young
2021-02-18 1:20 ` Dave Young
2021-02-18 2:02 ` Baoquan He
2021-02-23 2:03 ` john.p.donnelly
2021-02-23 12:01 ` Kairui Song
2021-02-23 13:56 ` Baoquan He [this message]
2021-02-23 17:54 ` Saeed Mirzamohammadi
2021-02-24 1:54 ` Baoquan He
2021-02-24 2:03 ` Baoquan He
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210223135605.GA3553@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@google.com \
--cc=christian.brauner@ubuntu.com \
--cc=corbet@lwn.net \
--cc=dyoung@redhat.com \
--cc=frederic@kernel.org \
--cc=gpiccoli@canonical.com \
--cc=john.p.donnelly@oracle.com \
--cc=jpoimboe@redhat.com \
--cc=kasong@redhat.com \
--cc=keescook@chromium.org \
--cc=kexec@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masahiroy@kernel.org \
--cc=mchehab+huawei@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=mingo@kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=saeed.mirzamohammadi@oracle.com \
--cc=samitolvanen@google.com \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=vgoyal@redhat.com \
--cc=yifeifz2@illinois.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).