Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1559876

Re: [PATCH] printk: Correctly handle preemption in console_unlock()

From Petr Mladek <pmladek@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCH] printk: Correctly handle preemption in console_unlock()
Date 2017-01-16 17:40 +0100
Message-ID <t0iu6-2WV-9@gated-at.bofh.it> (permalink)
References (4 earlier) <t0eTv-rg-5@gated-at.bofh.it> <t0fwd-WM-9@gated-at.bofh.it> <t0giC-1uH-21@gated-at.bofh.it> <t0hol-2dP-15@gated-at.bofh.it> <t0hHI-2nd-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 2017-01-17 00:43:43, Sergey Senozhatsky wrote:
> 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.

Yes, this is the direction. But I can not imagine to do all this in one
big step. It is even possible that it will simply not work. Just remember
the problems with suspend, sysrq, kexec.

There are more paths where we need to make sure that the messages
are flushed. And we must not rely only on deferred solutions (IRQ,
kthread) because they simply need not happen.

My expectation is that we will keep the sync mode as it is now for
some (long time). And we will do more and more deferring in the
async mode step by step. If the async mode proves to be perfectly
usable and people do not need the sync mode any longer, we could
remove the sync mode but only then.

By other words, I expect that we would first push a solution similar
to v12. It was tested for years in SUSE. Any bigger changes
would just cause another huge delay.

I am sorry but I am not a crazy jumper. The async printk idea was
blocked for years. We should not go into the other extreme now.

Best Regards,
Petr

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] printk: Correctly handle preemption in console_unlock() Petr Mladek <pmladek@suse.com> - 2017-01-13 14:20 +0100
  Re: [PATCH] printk: Correctly handle preemption in console_unlock() Steven Rostedt <rostedt@goodmis.org> - 2017-01-13 17:10 +0100
    Re: [PATCH] printk: Correctly handle preemption in console_unlock() Petr Mladek <pmladek@suse.com> - 2017-01-16 12:10 +0100
      Re: [PATCH] printk: Correctly handle preemption in console_unlock() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-01-18 06:50 +0100
        Re: [PATCH] printk: Correctly handle preemption in console_unlock() Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-01-18 08:40 +0100
          Re: [PATCH] printk: Correctly handle preemption in console_unlock() Petr Mladek <pmladek@suse.com> - 2017-01-25 13:40 +0100
  Re: [PATCH] printk: Correctly handle preemption in console_unlock() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-01-14 07:30 +0100
    Re: [PATCH] printk: Correctly handle preemption in console_unlock() Petr Mladek <pmladek@suse.com> - 2017-01-16 12:40 +0100
      Re: [PATCH] printk: Correctly handle preemption in console_unlock() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-01-16 13:00 +0100
        Re: [PATCH] printk: Correctly handle preemption in console_unlock() Petr Mladek <pmladek@suse.com> - 2017-01-16 13:50 +0100
          Re: [PATCH] printk: Correctly handle preemption in console_unlock() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-01-16 14:30 +0100
            Re: [PATCH] printk: Correctly handle preemption in console_unlock() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-01-16 14:50 +0100
            Re: [PATCH] printk: Correctly handle preemption in console_unlock() Petr Mladek <pmladek@suse.com> - 2017-01-16 15:20 +0100
              Re: [PATCH] printk: Correctly handle preemption in console_unlock() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-01-16 16:30 +0100
                Re: [PATCH] printk: Correctly handle preemption in console_unlock() Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-01-16 16:50 +0100
                Re: [PATCH] printk: Correctly handle preemption in console_unlock() Petr Mladek <pmladek@suse.com> - 2017-01-16 17:40 +0100
        Re: [PATCH] printk: Correctly handle preemption in console_unlock() Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> - 2017-01-16 14:50 +0100

csiph-web