All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Mladek <pmladek@suse.com>
To: Dave Young <dyoung@redhat.com>
Cc: sergey.senozhatsky@gmail.com, rostedt@goodmis.org,
	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: Wed, 17 Jan 2018 09:57:34 +0100	[thread overview]
Message-ID: <20180117085734.jx77p3brjykk3ude@pathway.suse.cz> (raw)
In-Reply-To: <20180117045057.GA4994@dhcp-128-65.nay.redhat.com>

On Wed 2018-01-17 12:50:57, Dave Young wrote:
> It is useful to print kdump kernel loaded status in dump_stack() 
> especially when panic happens so that we can  differenciate 
> kdump kernel early hang and a normal panic in a bug report.
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
> ---
>  kernel/printk/printk.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- linux-x86.orig/kernel/printk/printk.c
> +++ linux-x86/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>
> @@ -3127,6 +3128,8 @@ void dump_stack_print_info(const char *l
>  	if (dump_stack_arch_desc_str[0] != '\0')
>  		printk("%sHardware name: %s\n",
>  		       log_lvl, dump_stack_arch_desc_str);
> +	if (kexec_crash_loaded())
> +		printk("%skdump kernel loaded\n", log_lvl);

IMHO, it would be better to do it like for the workqueues.
I mean to call printk_kexec_info(log_lv1, current) here
that would be impletemented in kexec sources.
Then it could be maintained by kexec people.

Anyway, I wonder if the info about kexec_crash_loaded() is
enough. I am not much familiar with kexec. AFAIK,
the image might be loaded long time before it
is acutally used.

Finally, the style of the other lines is:

    Name: details

I would suggest to print something like:

    Kexec: details

, where the details might be whether the image is loaded,
whether the loaded kernel is being executed, and
other kexec-related flags.

How does that sound?

>  	print_worker_info(log_lvl, current);
>  }

Best Regards,
Petr

WARNING: multiple messages have this Message-ID (diff)
From: Petr Mladek <pmladek@suse.com>
To: Dave Young <dyoung@redhat.com>
Cc: sergey.senozhatsky@gmail.com, akpm@linux-foundation.org,
	kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
	rostedt@goodmis.org
Subject: Re: [PATCH] print kdump kernel loaded status in stack dump
Date: Wed, 17 Jan 2018 09:57:34 +0100	[thread overview]
Message-ID: <20180117085734.jx77p3brjykk3ude@pathway.suse.cz> (raw)
In-Reply-To: <20180117045057.GA4994@dhcp-128-65.nay.redhat.com>

On Wed 2018-01-17 12:50:57, Dave Young wrote:
> It is useful to print kdump kernel loaded status in dump_stack() 
> especially when panic happens so that we can  differenciate 
> kdump kernel early hang and a normal panic in a bug report.
>
> Signed-off-by: Dave Young <dyoung@redhat.com>
> ---
>  kernel/printk/printk.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> --- linux-x86.orig/kernel/printk/printk.c
> +++ linux-x86/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>
> @@ -3127,6 +3128,8 @@ void dump_stack_print_info(const char *l
>  	if (dump_stack_arch_desc_str[0] != '\0')
>  		printk("%sHardware name: %s\n",
>  		       log_lvl, dump_stack_arch_desc_str);
> +	if (kexec_crash_loaded())
> +		printk("%skdump kernel loaded\n", log_lvl);

IMHO, it would be better to do it like for the workqueues.
I mean to call printk_kexec_info(log_lv1, current) here
that would be impletemented in kexec sources.
Then it could be maintained by kexec people.

Anyway, I wonder if the info about kexec_crash_loaded() is
enough. I am not much familiar with kexec. AFAIK,
the image might be loaded long time before it
is acutally used.

Finally, the style of the other lines is:

    Name: details

I would suggest to print something like:

    Kexec: details

, where the details might be whether the image is loaded,
whether the loaded kernel is being executed, and
other kexec-related flags.

How does that sound?

>  	print_worker_info(log_lvl, current);
>  }

Best Regards,
Petr

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  reply	other threads:[~2018-01-17  8: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 [this message]
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
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=20180117085734.jx77p3brjykk3ude@pathway.suse.cz \
    --to=pmladek@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=dyoung@redhat.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --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: link
Be 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.