LWN.net Logo

printk() problems

printk() problems

Posted Jun 28, 2012 16:09 UTC (Thu) by zlynx (subscriber, #2285)
In reply to: printk() problems by nix
Parent article: printk() problems

There's a whole other problem here too. When a driver printk's some partial message and then goes off to wait on the hardware to come up, what is stopping the other driver which is running in parallel from printk'ing all over that line? Absolutely nothing, in fact.

Perhaps printk outputs need unique ID codes so the logging daemons know which bits to stick together.

Or just make each message a complete atomic entity.


(Log in to post comments)

printk() problems

Posted Jul 5, 2012 10:33 UTC (Thu) by incase (subscriber, #37115) [Link]

> Or just make each message a complete atomic entity.

In my opinion, this is the only sane approach. Makes boot logs longer with

xyz: initializing peripheral
abc: checking
xyz: peripheral OK
abc: Error
...

But doesn't interleave unrelated messages:

xyz: initializing abc: checking OK(from abc or xyz?)
Error (again: Which one?)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds