From: Dave Young <dyoung@redhat.com> To: Petr Mladek <pmladek@suse.com> Cc: Steven Rostedt <rostedt@goodmis.org>, Andi Kleen <ak@linux.intel.com>, sergey.senozhatsky@gmail.com, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, kexec@lists.infradead.org Subject: Re: [PATCH] print kdump kernel loaded status in stack dump Date: Sat, 27 Jan 2018 11:57:32 +0800 [thread overview] Message-ID: <20180127035732.GB26591@dhcp-128-65.nay.redhat.com> (raw) In-Reply-To: <20180126121757.kec5ecxfxf5fprbi@pathway.suse.cz> On 01/26/18 at 01:17pm, Petr Mladek wrote: > On Fri 2018-01-26 15:37:24, Dave Young wrote: > > On 01/19/18 at 12:47pm, Dave Young wrote: > > > On 01/18/18 at 01:57pm, Steven Rostedt wrote: > > > > On Thu, 18 Jan 2018 10:02:17 -0800 > > > > Andi Kleen <ak@linux.intel.com> wrote: > > > > > > > > > Dave Young <dyoung@redhat.com> writes: > > > > > > printk("%sHardware name: %s\n", > > > > > > log_lvl, dump_stack_arch_desc_str); > > > > > > + if (kexec_crash_loaded()) > > > > > > + printk("%skdump kernel loaded\n", log_lvl); > > > > > > > > > > Oops/warnings are getting longer and longer, often scrolling away > > > > > from the screen, and if the kernel crashes backscroll does not work > > > > > anymore, so precious information is lost. > > > > > > > > > > Can you merge it with some other line? > > > > > > > > > > Just a [KDUMP] or so somewhere should be good enough. > > > > > > > > Or perhaps we should add it as a TAINT. Not all taints are bad. > > > > > > Hmm, I also thought about this before but It sounds like not match the > > > "tainted" meaning with the assumption that it is bad :( > > > > > > Maybe it would be better to do like Andi said, but print a better word > > > than "KDUMP", eg. "Kdumpable" sounds better. If this is fine I can > > > repost the patch. > > > > I have been not available recently, sorry for late about the update, > > rethinking about this, it is looks good to use "[KDUMP]". Also for > > the tainted flags, I tried but it is not what we want since kdump kernel > > can be unloaded, this is not like "tainted" which can only be added and > > it can not be removed. > > > > How about below version? > > --- > > > > It is useful to print kdump kernel loaded status in dump_stack() > > especially when panic happens so that we can differentiate > > kdump kernel early hang and a normal panic in a bug report. > > > > Signed-off-by: Dave Young <dyoung@redhat.com> > > --- > > [v1 -> v2] merge the status in other line as Andi Kleen suggested > > kernel/printk/printk.c | 3 +++ > > --- linux.orig/kernel/printk/printk.c > > +++ linux/kernel/printk/printk.c > > @@ -48,6 +48,7 @@ > > #include <linux/sched/clock.h> > > #include <linux/sched/debug.h> > > #include <linux/sched/task_stack.h> > > +#include <linux/kexec.h> > > > > #include <linux/uaccess.h> > > #include <asm/sections.h> > > @@ -3118,9 +3119,11 @@ void __init dump_stack_set_arch_desc(con > > */ > > void dump_stack_print_info(const char *log_lvl) > > { > > - printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n", > > + printk("%sCPU: %d PID: %d Comm: %.20s %s %s %s %.*s\n", > > log_lvl, raw_smp_processor_id(), current->pid, current->comm, > > - print_tainted(), init_utsname()->release, > > + print_tainted(), > > + kexec_crash_loaded() ? "[KDUMP]" : "", > > I am afraid that people might be confused what that exactly means. > For example, if I would wonder if it was already running the crashdump > kernel. > > And two small nits. It always prints the extra space. It does not fit > the style of the line. > > What about the following? > > printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s\n", > log_lvl, raw_smp_processor_id(), current->pid, current->comm, > kexec_crash_loaded() ? "Kdump: loaded " : "", > print_tainted(), > init_utsname()->release, > (int)strcspn(init_utsname()->version, " "), > init_utsname()->version); > > It would produce something like: > > CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Not tainted 4.14.0-4-default+ #670 That should be a better version, thanks for catching the extra whitespace. Let me do a test and send it out as V2 separately. > > > Best Regards, > Petr
WARNING: multiple messages have this Message-ID (diff)
From: Dave Young <dyoung@redhat.com> To: Petr Mladek <pmladek@suse.com> Cc: Andi Kleen <ak@linux.intel.com>, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>, sergey.senozhatsky@gmail.com, akpm@linux-foundation.org Subject: Re: [PATCH] print kdump kernel loaded status in stack dump Date: Sat, 27 Jan 2018 11:57:32 +0800 [thread overview] Message-ID: <20180127035732.GB26591@dhcp-128-65.nay.redhat.com> (raw) In-Reply-To: <20180126121757.kec5ecxfxf5fprbi@pathway.suse.cz> On 01/26/18 at 01:17pm, Petr Mladek wrote: > On Fri 2018-01-26 15:37:24, Dave Young wrote: > > On 01/19/18 at 12:47pm, Dave Young wrote: > > > On 01/18/18 at 01:57pm, Steven Rostedt wrote: > > > > On Thu, 18 Jan 2018 10:02:17 -0800 > > > > Andi Kleen <ak@linux.intel.com> wrote: > > > > > > > > > Dave Young <dyoung@redhat.com> writes: > > > > > > printk("%sHardware name: %s\n", > > > > > > log_lvl, dump_stack_arch_desc_str); > > > > > > + if (kexec_crash_loaded()) > > > > > > + printk("%skdump kernel loaded\n", log_lvl); > > > > > > > > > > Oops/warnings are getting longer and longer, often scrolling away > > > > > from the screen, and if the kernel crashes backscroll does not work > > > > > anymore, so precious information is lost. > > > > > > > > > > Can you merge it with some other line? > > > > > > > > > > Just a [KDUMP] or so somewhere should be good enough. > > > > > > > > Or perhaps we should add it as a TAINT. Not all taints are bad. > > > > > > Hmm, I also thought about this before but It sounds like not match the > > > "tainted" meaning with the assumption that it is bad :( > > > > > > Maybe it would be better to do like Andi said, but print a better word > > > than "KDUMP", eg. "Kdumpable" sounds better. If this is fine I can > > > repost the patch. > > > > I have been not available recently, sorry for late about the update, > > rethinking about this, it is looks good to use "[KDUMP]". Also for > > the tainted flags, I tried but it is not what we want since kdump kernel > > can be unloaded, this is not like "tainted" which can only be added and > > it can not be removed. > > > > How about below version? > > --- > > > > It is useful to print kdump kernel loaded status in dump_stack() > > especially when panic happens so that we can differentiate > > kdump kernel early hang and a normal panic in a bug report. > > > > Signed-off-by: Dave Young <dyoung@redhat.com> > > --- > > [v1 -> v2] merge the status in other line as Andi Kleen suggested > > kernel/printk/printk.c | 3 +++ > > --- linux.orig/kernel/printk/printk.c > > +++ linux/kernel/printk/printk.c > > @@ -48,6 +48,7 @@ > > #include <linux/sched/clock.h> > > #include <linux/sched/debug.h> > > #include <linux/sched/task_stack.h> > > +#include <linux/kexec.h> > > > > #include <linux/uaccess.h> > > #include <asm/sections.h> > > @@ -3118,9 +3119,11 @@ void __init dump_stack_set_arch_desc(con > > */ > > void dump_stack_print_info(const char *log_lvl) > > { > > - printk("%sCPU: %d PID: %d Comm: %.20s %s %s %.*s\n", > > + printk("%sCPU: %d PID: %d Comm: %.20s %s %s %s %.*s\n", > > log_lvl, raw_smp_processor_id(), current->pid, current->comm, > > - print_tainted(), init_utsname()->release, > > + print_tainted(), > > + kexec_crash_loaded() ? "[KDUMP]" : "", > > I am afraid that people might be confused what that exactly means. > For example, if I would wonder if it was already running the crashdump > kernel. > > And two small nits. It always prints the extra space. It does not fit > the style of the line. > > What about the following? > > printk("%sCPU: %d PID: %d Comm: %.20s %s%s %s %.*s\n", > log_lvl, raw_smp_processor_id(), current->pid, current->comm, > kexec_crash_loaded() ? "Kdump: loaded " : "", > print_tainted(), > init_utsname()->release, > (int)strcspn(init_utsname()->version, " "), > init_utsname()->version); > > It would produce something like: > > CPU: 0 PID: 0 Comm: swapper/0 Kdump: loaded Not tainted 4.14.0-4-default+ #670 That should be a better version, thanks for catching the extra whitespace. Let me do a test and send it out as V2 separately. > > > Best Regards, > Petr _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2018-01-27 3:57 UTC|newest] Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-01-17 4:50 [PATCH] print kdump kernel loaded status in stack dump Dave Young 2018-01-17 4:50 ` Dave Young 2018-01-17 8:57 ` Petr Mladek 2018-01-17 8:57 ` Petr Mladek 2018-01-17 12:32 ` Dave Young 2018-01-17 12:32 ` Dave Young 2018-01-17 13:42 ` Petr Mladek 2018-01-17 13:42 ` Petr Mladek 2018-01-17 15:48 ` Steven Rostedt 2018-01-17 15:48 ` Steven Rostedt 2018-01-18 1:57 ` Dave Young 2018-01-18 1:57 ` Dave Young 2018-01-18 18:02 ` Andi Kleen 2018-01-18 18:02 ` Andi Kleen 2018-01-18 18:57 ` Steven Rostedt 2018-01-18 18:57 ` Steven Rostedt 2018-01-19 4:47 ` Dave Young 2018-01-19 4:47 ` Dave Young 2018-01-19 13:06 ` Petr Tesarik 2018-01-26 7:37 ` Dave Young 2018-01-26 7:37 ` Dave Young 2018-01-26 12:17 ` Petr Mladek 2018-01-26 12:17 ` Petr Mladek 2018-01-27 3:57 ` Dave Young [this message] 2018-01-27 3:57 ` Dave Young 2018-01-19 5:45 ` Sergey Senozhatsky 2018-01-19 5:45 ` Sergey Senozhatsky 2018-01-19 8:16 ` Dave Young 2018-01-19 8:16 ` Dave Young 2018-01-19 8:28 ` Sergey Senozhatsky 2018-01-19 8:28 ` Sergey Senozhatsky 2018-01-19 8:42 ` Dave Young 2018-01-19 8:42 ` Dave Young 2018-01-19 9:46 ` Sergey Senozhatsky 2018-01-19 9:46 ` Sergey Senozhatsky 2018-01-19 8:32 ` Sergey Senozhatsky 2018-01-19 8:32 ` Sergey Senozhatsky 2018-01-19 16:16 ` Andi Kleen 2018-01-19 16:16 ` Andi Kleen 2018-01-19 16:51 ` Petr Tesarik
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=20180127035732.GB26591@dhcp-128-65.nay.redhat.com \ --to=dyoung@redhat.com \ --cc=ak@linux.intel.com \ --cc=akpm@linux-foundation.org \ --cc=kexec@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=pmladek@suse.com \ --cc=rostedt@goodmis.org \ --cc=sergey.senozhatsky@gmail.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.