On Sun, 02 Jan 2005 13:41:34 -0800, "Randy.Dunlap" <rddunlap@xxxxxxxx> wrote:
Jim Nelson wrote:
Or does printk() do some tracking that I didn't see as to where in the kernel the strings are coming from?
That kind of garbled output has been known to happen, but
the <console_sem> is supposed to prevent that (along with
zap_locks() in kernel/printk.c).
Using multiple calls to printk to print a single line has always been
subject to the possibility of interleaving on SMP. We just live with
the risk. Printing a complete line in a single call to printk is
protected by various locks. Print a line in multiple calls is not
protected. If it bothers you that much, build up the line in a local
buffer then call printk once.