2004-10-31 16:27:20

by Jan Engelhardt

[permalink] [raw]
Subject: Disambiguation for panic_timeout's sysctl



The /proc/sys/kernel/panic file looked to me like it was something like
/proc/sysrq-trigger -- until I looked into the kernel sources which reveal that
it sets the variable "panic_timeout" in kernel/sched.c.
I'm up for disambiguating this, patch appended.


Signed-off by: Jan Engelhardt <[email protected]>

# File: fixpanicname.diff
# Class: Disambiguation
#
--- linux-2.6.9-rc2/kernel/sysctl.c 2004-10-31 17:10:00.976522528 +0100
+++ modified/kernel/sysctl.c 2004-10-31 17:09:50.970043000 +0100
@@ -276,7 +276,7 @@ static ctl_table kern_table[] = {
},
{
.ctl_name = KERN_PANIC,
- .procname = "panic",
+ .procname = "panic_timeout",
.data = &panic_timeout,
.maxlen = sizeof(int),
.mode = 0644,
## eof


Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, http://www.gwdg.de


2004-11-01 12:02:31

by Olaf Hering

[permalink] [raw]
Subject: Re: Disambiguation for panic_timeout's sysctl

On Sun, Oct 31, Jan Engelhardt wrote:

>
>
> The /proc/sys/kernel/panic file looked to me like it was something like
> /proc/sysrq-trigger -- until I looked into the kernel sources which reveal that
> it sets the variable "panic_timeout" in kernel/sched.c.

This will probably break applications that expect the filename 'panic'.

--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

2004-11-01 12:04:19

by Christoph Hellwig

[permalink] [raw]
Subject: Re: Disambiguation for panic_timeout's sysctl

On Mon, Nov 01, 2004 at 01:02:27PM +0100, Olaf Hering wrote:
> On Sun, Oct 31, Jan Engelhardt wrote:
>
> >
> >
> > The /proc/sys/kernel/panic file looked to me like it was something like
> > /proc/sysrq-trigger -- until I looked into the kernel sources which reveal that
> > it sets the variable "panic_timeout" in kernel/sched.c.
>
> This will probably break applications that expect the filename 'panic'.

And why should applications care for the panic timeout? Especially only
a few days after it's been added to the kernel?

2004-11-01 12:06:51

by Jan Engelhardt

[permalink] [raw]
Subject: Re: Disambiguation for panic_timeout's sysctl


>> > The /proc/sys/kernel/panic file looked to me like it was something like
>> > /proc/sysrq-trigger -- until I looked into the kernel sources which reveal that
>> > it sets the variable "panic_timeout" in kernel/sched.c.
>>
>> This will probably break applications that expect the filename 'panic'.
>
>And why should applications care for the panic timeout? Especially only
>a few days after it's been added to the kernel?

So it's a brand new variable in sysctl after all? Well then I'd like the change
even more :)



Jan Engelhardt
--
Gesellschaft für Wissenschaftliche Datenverarbeitung
Am Fassberg, 37077 Göttingen, http://www.gwdg.de

2004-11-01 12:11:22

by Olaf Hering

[permalink] [raw]
Subject: Re: Disambiguation for panic_timeout's sysctl

On Mon, Nov 01, Christoph Hellwig wrote:

> On Mon, Nov 01, 2004 at 01:02:27PM +0100, Olaf Hering wrote:
> > On Sun, Oct 31, Jan Engelhardt wrote:
> >
> > >
> > >
> > > The /proc/sys/kernel/panic file looked to me like it was something like
> > > /proc/sysrq-trigger -- until I looked into the kernel sources which reveal that
> > > it sets the variable "panic_timeout" in kernel/sched.c.
> >
> > This will probably break applications that expect the filename 'panic'.
>
> And why should applications care for the panic timeout? Especially only
> a few days after it's been added to the kernel?

/proc/sys/kernel/panic exists since at least 2.6.5.
Its used to override the silly default '0' on i386, but one should be
able to boot with panic=$bignum

--
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

2004-11-01 16:05:41

by Ricky Beam

[permalink] [raw]
Subject: Re: Disambiguation for panic_timeout's sysctl

On Mon, 1 Nov 2004, Olaf Hering wrote:
>> And why should applications care for the panic timeout? Especially only
>> a few days after it's been added to the kernel?
>
>/proc/sys/kernel/panic exists since at least 2.6.5.
>Its used to override the silly default '0' on i386, but one should be
>able to boot with panic=$bignum

/proc/sys/kernel/panic has been around for YEARS:

[cramer:ttyp0]dominion:~/[10:52am]:uname -a
Linux dominion 2.3.42-SMP #11 SMP Sun Feb 6 20:06:02 EST 2000 i686
^^^^^^^^^^^^^^^^^^^^^^ ****
[cramer:ttyp0]dominion:~/[10:52am]:ls -l /proc/sys/kernel/panic
-rw-r--r-- 1 root root 0 Nov 1 10:52 /proc/sys/kernel/panic

And that's the oldest kernel I happen to have running at the moment.

--Ricky


2004-11-01 16:18:17

by Randy.Dunlap

[permalink] [raw]
Subject: Re: Disambiguation for panic_timeout's sysctl

Olaf Hering wrote:
> On Mon, Nov 01, Christoph Hellwig wrote:
>
>
>>On Mon, Nov 01, 2004 at 01:02:27PM +0100, Olaf Hering wrote:
>>
>>> On Sun, Oct 31, Jan Engelhardt wrote:
>>>
>>>
>>>>
>>>>The /proc/sys/kernel/panic file looked to me like it was something like
>>>>/proc/sysrq-trigger -- until I looked into the kernel sources which reveal that
>>>>it sets the variable "panic_timeout" in kernel/sched.c.
>>>
>>>This will probably break applications that expect the filename 'panic'.
>>
>>And why should applications care for the panic timeout? Especially only
>>a few days after it's been added to the kernel?
>
>
> /proc/sys/kernel/panic exists since at least 2.6.5.
> Its used to override the silly default '0' on i386, but one should be
> able to boot with panic=$bignum

It's not new. It's in 2.4.26.
And it's documented in Documentation/kernel-parameters.txt,
so any patch that changes it should also change that .txt file.



--
~Randy
MOTD: Always include version info.
(Again. Sometimes I think ln -s /usr/src/linux/.config .signature)