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


Groups > linux.kernel > #1362282

Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async

From Byungchul Park <byungchul.park@lge.com>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async
Date 2016-03-22 03:20 +0100
Message-ID <rfk5j-6bs-3@gated-at.bofh.it> (permalink)
References (5 earlier) <rf4jT-3xO-1@gated-at.bofh.it> <rf99U-71Q-11@gated-at.bofh.it> <rf9CW-7tl-27@gated-at.bofh.it> <rfa5Y-7FH-11@gated-at.bofh.it> <rfbEK-mO-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Mar 22, 2016 at 02:11:05AM +0900, Sergey Senozhatsky wrote:
> On (03/21/16 16:33), Jan Kara wrote:
> [..]
> > > > And by calling wake_up_process() under logbuf_lock, you actually introduce
> > > > recursion issues for printk_deferred() messages which are supposed to be
> > > > working from under rq->lock and similar. So I think you have to keep this
> > > > section outside of logbuf_lock.
> > > 
> > > hm, in_sched (printk_deferred()) messages are printed by
> > > irq work->wake_up_klogd_work_func(), not by wake_up_process()
> > > from vprintk_emit(). or am I missing something?
> > 
> > Think of following:
> > 
> > some function
> >   printk()
> >     vprintk_emit()
> >       spin_lock(&logbuf_lock);
> >       ...
> >       wake_up_process()
> >         printk_deferred()
> >           vprintk_emit() -> recursion on logbuf_lock
> 
> uh, indeed. I was more concerned about printk() calls that are
> troublemakers and are already in wake_up_process() - spin_dump()s.
> but yes, braking printk_deferred() in this case is a regression.

Already said any kind of printk() cannot work within logbuf_lock. :-(

> thanks for pointing that out. and also thanks to Byungchul.

My pleasure.

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


Thread

[RFC][PATCH v5 0/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-20 15:20 +0100
  [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-20 15:20 +0100
    Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-21 01:10 +0100
      Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-21 01:50 +0100
        Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-21 02:00 +0100
          Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-21 08:40 +0100
            Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-21 09:10 +0100
              Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-21 09:50 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-21 10:30 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Jan Kara <jack@suse.cz> - 2016-03-21 15:40 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-21 16:10 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Jan Kara <jack@suse.cz> - 2016-03-21 16:40 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-21 18:20 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-22 03:20 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-22 03:20 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-22 07:00 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Byungchul Park <byungchul.park@lge.com> - 2016-03-22 08:00 +0100
                Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-22 08:50 +0100
              Re: [RFC][PATCH v5 1/2] printk: Make printk() completely async Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-03-21 10:00 +0100
  [RFC][PATCH v5 2/2] printk: Make wake_up_klogd_work_func() async Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2016-03-20 15:20 +0100

csiph-web