<div dir="ltr">HI Dave,<div><br><br><div class="gmail_quote">On Fri, Dec 23, 2011 at 9:10 PM, Dave Hylands <span dir="ltr"><<a href="mailto:dhylands@gmail.com">dhylands@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Syam,<br>
<div><div class="h5"><br>
On Thu, Dec 22, 2011 at 10:59 PM, Syam <<a href="mailto:k.meghasyam@gmail.com">k.meghasyam@gmail.com</a>> wrote:<br>
> HI All,<br>
><br>
> I am getting more than 1 sec delay during booting.<br>
> While registering console (for serial console ttys ), there is about 1 sec<br>
> delay in executing the console_unlock() in printk.c<br>
><br>
> It was found that delay is occuring in call_console_drivers()<br>
> ******************************<br>
> if (c == '\n') {<br>
> if (msg_level < 0) {<br>
> /*<br>
> * printk() has already given us loglevel tags in<br>
> * the buffer. This code is here in case the<br>
> * log buffer has wrapped right round and scribbled<br>
> * on those tags<br>
> */<br>
> msg_level = default_message_loglevel;<br>
> }<br>
> _call_console_drivers(start_print, cur_index, msg_level); // if this part<br>
> is commented, there is no delay observed?<br>
> *******************************<br>
><br>
><br>
> is there any way to find out what is causing the delay.<br>
<br>
</div></div>The kernel actually starts logging the printk buffer before any<br>
consoles are registered. When the first console is registered, it then<br>
prints all of those messages which have been buffered until that time.<br>
If you're logging your console messages to a serial port, then all of<br>
those characters actually need to be sent out the UART, which is<br>
probably where most of the time is being spent.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Dave Hylands<br>
Shuswap, BC, Canada<br>
<a href="http://www.davehylands.com" target="_blank">http://www.davehylands.com</a><br>
</font></span></blockquote></div><div><br></div>Thanks for the information. You are correct. I could see all the buffered messages are getting flushed during that part of execution.</div><div>I guess, the only way to remove the delay is to remove the serial console logging by passing console=null.</div>
<div><br></div><div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Warm Regards,<br>Syam</div><br>
</div></div>