public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Hansen <dave@linux.vnet.ibm.com>
To: Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: Re: [PATCH 0/0] Panic on softdog timeout
Date: Tue, 18 Jan 2011 08:35:27 -0800	[thread overview]
Message-ID: <1295368527.31327.193.camel@nimitz> (raw)
In-Reply-To: <4D358B34.7040902@linux.vnet.ibm.com>

On Tue, 2011-01-18 at 18:14 +0530, Anithra P Janakiraman wrote:
> We currently have no way of determining the reason for failure when a 
> softdog timeout occurs. At the minimum a snapshot of the system would 
> help to determine the cause.
> The attached patch invokes panic on softdog timeout iff kdump is 
> configured, if kdump is not configured it works as usual.

This sounds like a decent idea.  But, is it something that should be a
bit more optional?  We currently have boot options for when to reboot or
panic for other things, and this is really the first use of
kexec_crash_image outside of kexec itself.  Is it really the best switch
to use?

Will this break anyone who expects a quick, clean, reboot and instead
gets a kdump?  Should we make _all_ emergency_restart()s use kdump?

You might have noticed, but your subject is a little wonky.  It should
probably just omit the 1/1 stuff when you only have a single patch
series.  The subject is pretty short and doesn't really explain what's
going on.  Could you beef it up a bit?

> @@ -48,6 +48,7 @@
>  #include <linux/init.h>
>  #include <linux/jiffies.h>
>  #include <linux/uaccess.h>
> +#include <linux/kexec.h>
> 
>  #define PFX "SoftDog: "
> 
> @@ -99,10 +100,15 @@
>         if (soft_noboot)
>                 printk(KERN_CRIT PFX "Triggered - Reboot ignored.\n");
>         else {
> -               printk(KERN_CRIT PFX "Initiating system reboot.\n");
> -               emergency_restart();
> -               printk(KERN_CRIT PFX "Reboot didn't ?????\n");
> -       }
> +               if (kexec_crash_image) {
> +                       printk(KERN_CRIT PFX "Initiating kdump. \n");
> +                       panic("Watchdog timer expired.");
> +               } else {
> +                       printk(KERN_CRIT PFX "Initiating system reboot. \n");
> +                       emergency_restart();
> +                       printk(KERN_CRIT PFX "Reboot didn't ?????\n");
> +               }
> +             }
>  }

The whitespace here is a bit damaged.  You might want to double-check
what your editor did to it.

Also, it's a bit more conventional to append patches to emails rather
than actually attach them.

Please also find some maintainers of this code or people you expect to
accept it, and cc them.  People are likely to miss this on LKML.

>  struct kimage *kexec_image;
>  struct kimage *kexec_crash_image;
> +EXPORT_SYMBOL(kexec_crash_image);

EXPORT_SYMBOL_GPL(), perhaps?

It also isn't _immediately_ obvious why you're doing this.  A quick
little blurb in the patch description would help.

-- Dave


  parent reply	other threads:[~2011-01-18 16:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 12:44 [PATCH 0/0] Panic on softdog timeout Anithra P Janakiraman
2011-01-18 15:52 ` Américo Wang
2011-01-20  9:09   ` Anithra P Janakiraman
2011-01-18 16:35 ` Dave Hansen [this message]
2011-01-25 15:10   ` Anithra P Janakiraman

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=1295368527.31327.193.camel@nimitz \
    --to=dave@linux.vnet.ibm.com \
    --cc=anithra@linux.vnet.ibm.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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