Messages in this thread | | | From | Linus Torvalds <> | Date | Thu, 15 Dec 2011 09:08:32 -0800 | Subject | Re: printk() vs tty_io |
| |
On Thu, Dec 15, 2011 at 1:56 AM, Peter Zijlstra <peterz@infradead.org> wrote: > > We probably could, I can have a closer look, but the main question is, > are we going to commit to no wakeups from console implementations? That > would mean removing the USB serial console support and other such stuff.
I guess we can't.
So new approach:
- screw it. the rq lock is just too central, you cannot call printk from under it. And if you have an oops under it, you're screwed.
Peter, why do you want to try to work from under the rq lock?
- Make a special "debug printk" that is not synchronous. Just make it buffer things, and have it actually print out from a worker thread or whatever. This one *only* takes the lock for that buffer itself, and works everywhere. We could probably even do tricks to make it NMI-safe.
Make code that isn't an oops or other very synchronous "have to print out *now*" aim to use this "softer" printk.
Hmm?
Linus
| |