removal of console_lock
Quoted 6 lines
- Major revamp of
printk(). The approach taken inprintk()is to try to acquire the (new)console_sem. If we succeed, the output is placed into the log buffer and is printed to the consoles. If we fail to acquire the semaphore we just buffer the output in the log buffer and the current holder of theconsole_semwill do the printing for us prior to releasingconsole_sem.
Is down_trylock reliable under load?
I remember 2 or 3 bug reports than disappeared after down_trylock was removed.
The last one was this week.
http://www.mail-archive.com/[email protected]/msg31919.html
--
Manfred
Quoted 9 lines · Manfred Spraul
Quoted 7 lines
- Major revamp of
printk(). The approach taken inprintk()is to try to acquire the (new)console_sem. If we succeed, the output is placed into the log buffer and is printed to the consoles. If we fail to acquire the semaphore we just buffer the output in the log buffer and the current holder of theconsole_semwill do the printing for us prior to releasingconsole_sem.Is
down_trylockreliable under load?
I'm not aware of any problems. It's only really used in one place at present - when networking interrupt context wants to acquire a socket's semaphore. Oh. That seems to have disappeared.
I've tested it pretty hard on SMP with zillions of printk()s from interrupt context in parallel with `cat lots_of_stuff'.
Quoted 5 lines
I remember 2 or 3 bug reports than disappeared after
down_trylockwas removed.
The last one was this week.
That was different. The parport code was leaving the semaphore in a downed state when it shouldn't have.
But you're right - it's not well-proven code. I'll go stare angrily at it for a while. Of course, there are about ten different implementations...
-