<br><br><div class="gmail_quote">On Thu, May 3, 2012 at 7:21 AM, Arun KS <span dir="ltr"><<a href="mailto:getarunks@gmail.com" target="_blank">getarunks@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 Chetan,<br>
<div class="im"><br>
On Thu, May 3, 2012 at 3:35 PM, Chetan Nanda <<a href="mailto:chetannanda@gmail.com">chetannanda@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> We are working on ARM based SOC.<br>
> Currently we are implementing a efficient tracing mechanism to logs messages<br>
> from a dedicated MCU.<br>
><br>
> For this, we share a circular buffer between ARM and MCU and messages stored<br>
> in the buffer will be put into kernel ring-buffer and then output via dmesg<br>
> call.<br>
> Strangely wringing a single log message in the kernel ring-buffer cost<br>
> around 6-8ms.<br>
<br>
</div>Consider this situvation, if your do a printk message of 100<br>
characters at a baud rate of 115200 bps on your UART console.<br>
Now 1 bit it will take 8.68 us(ie.. 1/115200).<br>
<br>
So 100 character ie.. 800 bits(exculuding parity, stop bits and all<br>
other over heads) will take 8.68 us * 800 = 6.94 ms.<br>
<br>
How are you writing to the kernel log buffer?<br>
Are you using UART as console? If yes what is your baud rate?<br>
<br>
If possible give more details about your design.<br>
<br></blockquote><div>I think Arun's assumptions are valid here. I am not aware of how the kernel ring buffer is used, but I would think it is better to have the logs printed out from a user space application. That way you are not blocking the kernel to spend time printing each message that gets put into the buffer. Does that make sense?</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks,<br>
Arun<br>
<div class="im"><br>
><br>
> Please help to confirm this, or we are doing something wrong.<br>
><br>
> Thanks,<br>
> Chetan Nanda<br>
><br>
</div>> _______________________________________________<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" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
><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" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</blockquote></div><br>