<div dir="ltr">Hello Alexander,<div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 11:08 AM, Alexander <span dir="ltr"><<a href="mailto:alexhoppus111@gmail.com" target="_blank">alexhoppus111@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 Arun KS,<br>
Actually, i already saw this one and something similar were tested. I just trying<br>
to figure out the reasons why generic kernel layer (console_unlock) implemented<br>
in such way: i.e. why it accounts on immediate busyloop printing? Is it reliable to<br>
defer such printing to UART interrupts?<br></blockquote><div><br></div><div>Lets try to find out why it is done the way it is. My guess is "it makes printk simple and robust". Because if interrupts are blocked, console should not fail giving the critical information.</div><div><br></div><div>To change this behavior, we have to change the complete logic in the prink code to adjust with that. Because as of now printk code expects serial drivers returns only after finishing the job.</div><div><br></div><div>Thanks,</div><div>Arun </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thank you.<br>
<span class=""><br>
On Mon, 20 Jul 2015 09:34:16 +0530<br>
Arun KS <<a href="mailto:getarunks@gmail.com">getarunks@gmail.com</a>> wrote:<br>
<br>
> Hello Alexander,<br>
><br>
</span><span class="">> On Sat, Jul 18, 2015 at 11:23 AM, Alexander <<a href="mailto:alexhoppus111@gmail.com">alexhoppus111@gmail.com</a>> wrote:<br>
><br>
> ><br>
> > Hi!<br>
> > When i checked how kernel printing works, i mentioned that it takes<br>
> > messages<br>
> > from log_buffer in console_unlock and gives it to call_console_drivers -><br>
> > ...<br>
> > -> some uart bsp function. Basically, as i see this BSP realization tries<br>
> > to flush all message chars in busyloop ... so it waits until FIFO_NOT_FULL<br>
> > bit will<br>
> > be dropped by UART and it will be able to push the next byte.<br>
> > Basically, as i see userspace printing do something different. It puts<br>
> > N_FIFO_BYTES<br>
> > and exits, next, when FIFO will be freed - interrupt will be generated, and<br>
> > other characters will be put into UART FIFO.<br>
> > Can we do something similar for kernel printing? i.e. do not busyloop<br>
> > sending char<br>
> > after char, but put N_FIFO chars and flush other in interrupt. When panic<br>
> > will occur<br>
> > we can do busyloop printing again. Is it reliable? Suppose we have several<br>
> > cores.<br>
> > Thank you.<br>
> ><br>
> What about trying this patch,<br>
> <a href="https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/printk/printk.c?id=5874af2003b1aaaa053128d655710140e3187226" rel="noreferrer" target="_blank">https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/kernel/printk/printk.c?id=5874af2003b1aaaa053128d655710140e3187226</a><br>
><br>
</span><span class="">> Its not changing console printing through UART to interrupt mode. But<br>
> minimizes the time interrupts being disabled on printk().<br>
><br>
> Thanks,<br>
> Arun<br>
><br>
><br>
><br>
> ><br>
> > --<br>
</span>> > Alexander <<a href="mailto:alexhoppus111@gmail.com">alexhoppus111@gmail.com</a>><br>
> ><br>
> > _______________________________________________<br>
> > Kernelnewbies mailing list<br>
> > <a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
> > <a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" rel="noreferrer" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
> ><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Alexander <<a href="mailto:alexhoppus111@gmail.com">alexhoppus111@gmail.com</a>><br>
</font></span></blockquote></div><br></div></div>