Re: [PATCH] printk: add halt_delay parameter for printk delay in halt phase
From: Dave Young
Date: Thu Jun 11 2009 - 21:21:39 EST
On Thu, Jun 11, 2009 at 10:43 PM, Pavel Machek<pavel@xxxxxx> wrote:
> On Tue 2009-06-02 17:54:52, Dave Young wrote:
>> Add a halt_delay module parameter in printk.c used to read the printk
>> messages in halt/poweroff/restart phase, delay each printk messages
>> by halt_delay milliseconds. It is useful for debugging if there's no
>> other way to dump kernel messages that time.
>>
>> halt_delay default value is 0, change it by:
>>
>> echo xxx > /sys/module/printk/parameters/halt_delay
>
> Well, stopping oopses from scrolling offscreen was very useful for me
> in past.
>
>> +static inline void halt_delay_msec(void)
>> +{
>> + Â Â if (halt_delay == 0 || !(system_state == SYSTEM_HALT
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â || system_state == SYSTEM_POWER_OFF
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â || system_state == SYSTEM_RESTART))
>> + Â Â Â Â Â Â return;
>> +
>> + Â Â mdelay(halt_delay);
>
> ...but this will not trigger for oops, right?
Hi, Pavel, this is for halt phase only.
Andrew suggest to make it a general feature, thus we can enable printk
delay when we want. I will write a new patch for that.
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂPavel
>
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
>
--
Regards
dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/