Re: [PATCH] boot_delay should only affect output

From: Andrew Cooks
Date: Wed Nov 21 2012 - 11:35:33 EST


Hi Joe

On Wed, Nov 14, 2012 at 4:31 PM, Joe Perches <joe@xxxxxxxxxxx> wrote:
> On Tue, 2012-11-13 at 14:50 +0800, Andrew Cooks wrote:
>> The boot_delay parameter affects all printk(), even if the log level
>> prevents visible output from the call. It results in delays greater
>> than the user intended without purpose.
>>
>> This patch changes the behaviour of boot_delay to only delay output.
>
> Seems sensible.
>
> Couldn't that be done for printk_delay too?
>

This was only my second submitted patch, so I tried to keep things as
simple as possible to get the process right.

When printk_delay is called, the log message is written into a buffer
regardless of log level. The log level may change before the logs are
flushed to console/syslog, so delaying based on log level at the
buffer input side is not ideal.

I thought about moving the delay to the point where the buffer is
cleared, but that seems like it would drastically increase the
likelihood of dropping messages under load.

Dropping the message in vprintk_emit, before any delay or buffer
management might also be an option, though I'm not sure if it's
acceptable for printk to return 0.

a.
--
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/