lkml.org 
[lkml]   [2017]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] printk: Correctly handle preemption in console_unlock()
On (01/17/17 00:19), Sergey Senozhatsky wrote:
[..]
> > I am confused by the sentence.
> >
> > If it is a synchronous mode then console_trylock()/console_unlock() must
> > be called directly from printk()/vprintk_emit().
> >
> > If you move this to a deferred callback, it is not longer synchronous.
>
> yes, everything is about to move to the deferred printk() handler.
> it has been discussed during the LPC/KS session. Linus proposed it,
> to be exact. and I was quite sure that everyone in the room,
> including you, agreed. we either do everything asking scheduled for
> help (wake_up()), which is async printk. or do the print out from
> deferred printk() handler /** 1) in case of panic() there is a
> console_flush_on_panic() call. 2) once the system stores at least
> one EMERG loglevel message, we don't wake_up() printk_kthread from
> deferred printk handler. **/

gosh.. sorry. I need some rest. badly. the above is not completely
accurate. "make printk always behave like printk deferred" was in
my presentation and proposal. the difference was in EMERG loglevel
handling. Linus suggested to handle it in deferred printk handler
as well, while I initially wanted to handle EMERG messages in
vprintk_emit() as a special case/exception. but I like the idea of
doing everything in printk deferred handler better. printk is moving
there anyway. otherwise there is no way of resolving printk deadlocks
on "external" locks.

-ss

\
 
 \ /
  Last update: 2017-01-16 16:44    [W:0.047 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site