public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] MIPS/PA-RISC: panic immediately when panic_on_oops
@ 2016-03-09 20:08 Aaro Koskinen
  2016-03-09 20:08 ` [PATCH 1/2] MIPS: " Aaro Koskinen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Aaro Koskinen @ 2016-03-09 20:08 UTC (permalink / raw)
  To: Ralf Baechle, James E.J. Bottomley, Helge Deller, linux-mips,
	linux-parisc, linux-kernel
  Cc: Aaro Koskinen

Hi,

MIPS and PA-RISC want to sleep 5 seconds before panicking when
panic_on_oops is set, with no apparent reason. We should remove
this feature, since some users may want their systems to fail as
quickly as possible.

Users who want to delay reboot after panic can use PANIC_TIMEOUT.

Also, this change will unify the behaviour with other architectures.

Aaro Koskinen (2):
  MIPS: panic immediately when panic_on_oops
  PA-RISC: panic immediately when panic_on_oops

 arch/mips/kernel/traps.c   | 5 +----
 arch/parisc/kernel/traps.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

-- 
2.4.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] MIPS: panic immediately when panic_on_oops
  2016-03-09 20:08 [PATCH 0/2] MIPS/PA-RISC: panic immediately when panic_on_oops Aaro Koskinen
@ 2016-03-09 20:08 ` Aaro Koskinen
  2016-03-09 20:08 ` [PATCH 2/2] PA-RISC: " Aaro Koskinen
  2016-03-10  0:09 ` [PATCH 0/2] MIPS/PA-RISC: " Ralf Baechle
  2 siblings, 0 replies; 5+ messages in thread
From: Aaro Koskinen @ 2016-03-09 20:08 UTC (permalink / raw)
  To: Ralf Baechle, James E.J. Bottomley, Helge Deller, linux-mips,
	linux-parisc, linux-kernel
  Cc: Aaro Koskinen

MIPS wants to sleep 5 seconds before panicking when panic_on_oops is set,
with no apparent reason. Remove this feature, since some users may want
their systems to fail as quickly as possible.

Users who want to delay reboot after panic can use PANIC_TIMEOUT.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 arch/mips/kernel/traps.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index bf14da9..5756740 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -398,11 +398,8 @@ void __noreturn die(const char *str, struct pt_regs *regs)
 	if (in_interrupt())
 		panic("Fatal exception in interrupt");
 
-	if (panic_on_oops) {
-		printk(KERN_EMERG "Fatal exception: panic in 5 seconds");
-		ssleep(5);
+	if (panic_on_oops)
 		panic("Fatal exception");
-	}
 
 	if (regs && kexec_should_crash(current))
 		crash_kexec(regs);
-- 
2.4.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] PA-RISC: panic immediately when panic_on_oops
  2016-03-09 20:08 [PATCH 0/2] MIPS/PA-RISC: panic immediately when panic_on_oops Aaro Koskinen
  2016-03-09 20:08 ` [PATCH 1/2] MIPS: " Aaro Koskinen
@ 2016-03-09 20:08 ` Aaro Koskinen
  2016-03-09 21:03   ` Helge Deller
  2016-03-10  0:09 ` [PATCH 0/2] MIPS/PA-RISC: " Ralf Baechle
  2 siblings, 1 reply; 5+ messages in thread
From: Aaro Koskinen @ 2016-03-09 20:08 UTC (permalink / raw)
  To: Ralf Baechle, James E.J. Bottomley, Helge Deller, linux-mips,
	linux-parisc, linux-kernel
  Cc: Aaro Koskinen

PA-RISC wants to sleep 5 seconds before panicking when panic_on_oops
is set, with no apparent reason. Remove this feature, since some users
may want their systems to fail as quickly as possible.

Users who want to delay reboot after panic can use PANIC_TIMEOUT.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
---
 arch/parisc/kernel/traps.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 553b098..16e0735 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -284,11 +284,8 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
 	if (in_interrupt())
 		panic("Fatal exception in interrupt");
 
-	if (panic_on_oops) {
-		printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
-		ssleep(5);
+	if (panic_on_oops)
 		panic("Fatal exception");
-	}
 
 	oops_exit();
 	do_exit(SIGSEGV);
-- 
2.4.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] PA-RISC: panic immediately when panic_on_oops
  2016-03-09 20:08 ` [PATCH 2/2] PA-RISC: " Aaro Koskinen
@ 2016-03-09 21:03   ` Helge Deller
  0 siblings, 0 replies; 5+ messages in thread
From: Helge Deller @ 2016-03-09 21:03 UTC (permalink / raw)
  To: Aaro Koskinen, Ralf Baechle, James E.J. Bottomley, linux-mips,
	linux-parisc, linux-kernel

On 09.03.2016 21:08, Aaro Koskinen wrote:
> PA-RISC wants to sleep 5 seconds before panicking when panic_on_oops
> is set, with no apparent reason. 

That's not completely true.
A few years back, when we had lots of crashes, it was very useful to at least
have some time to see the crash before the oops was cleaned from the screen.
Today the parisc port is really stable.

> Remove this feature, since some users
> may want their systems to fail as quickly as possible.
> 
> Users who want to delay reboot after panic can use PANIC_TIMEOUT.

That's OK.

> Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>

Acked-by: Helge Deller <deller@gmx.de>


> ---
>  arch/parisc/kernel/traps.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
> index 553b098..16e0735 100644
> --- a/arch/parisc/kernel/traps.c
> +++ b/arch/parisc/kernel/traps.c
> @@ -284,11 +284,8 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
>  	if (in_interrupt())
>  		panic("Fatal exception in interrupt");
>  
> -	if (panic_on_oops) {
> -		printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
> -		ssleep(5);
> +	if (panic_on_oops)
>  		panic("Fatal exception");
> -	}
>  
>  	oops_exit();
>  	do_exit(SIGSEGV);
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/2] MIPS/PA-RISC: panic immediately when panic_on_oops
  2016-03-09 20:08 [PATCH 0/2] MIPS/PA-RISC: panic immediately when panic_on_oops Aaro Koskinen
  2016-03-09 20:08 ` [PATCH 1/2] MIPS: " Aaro Koskinen
  2016-03-09 20:08 ` [PATCH 2/2] PA-RISC: " Aaro Koskinen
@ 2016-03-10  0:09 ` Ralf Baechle
  2 siblings, 0 replies; 5+ messages in thread
From: Ralf Baechle @ 2016-03-10  0:09 UTC (permalink / raw)
  To: Aaro Koskinen
  Cc: James E.J. Bottomley, Helge Deller, linux-mips, linux-parisc,
	linux-kernel

On Wed, Mar 09, 2016 at 10:08:41PM +0200, Aaro Koskinen wrote:

> MIPS and PA-RISC want to sleep 5 seconds before panicking when
> panic_on_oops is set, with no apparent reason. We should remove
> this feature, since some users may want their systems to fail as
> quickly as possible.
> 
> Users who want to delay reboot after panic can use PANIC_TIMEOUT.
> 
> Also, this change will unify the behaviour with other architectures.

I did a bit of dumpster diving, commit cea6a4ba8acfba6f59cc9ed71e0d05cb770b9d9c
("[PATCH] panic_on_oops: remove ssleep()") removed the 5 second delay
from ARM, i386, ia64, powerpc, x86_64 and xtensa on 2006-03-07.

The idea once upon a time probably was to keep the panic message on the
console long enough so somebody has _maybe_ a chance to read it.  Which
is a pretty weak solution.

  Ralf

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-10  0:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-09 20:08 [PATCH 0/2] MIPS/PA-RISC: panic immediately when panic_on_oops Aaro Koskinen
2016-03-09 20:08 ` [PATCH 1/2] MIPS: " Aaro Koskinen
2016-03-09 20:08 ` [PATCH 2/2] PA-RISC: " Aaro Koskinen
2016-03-09 21:03   ` Helge Deller
2016-03-10  0:09 ` [PATCH 0/2] MIPS/PA-RISC: " Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox