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


Groups > linux.kernel > #1572474

Re: [PATCHv7 4/8] printk: always use deferred printk when flush printk_safe lines

From Petr Mladek <pmladek@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCHv7 4/8] printk: always use deferred printk when flush printk_safe lines
Date 2017-02-02 16:40 +0100
Message-ID <t6rEm-5Ol-11@gated-at.bofh.it> (permalink)
References <sT0LE-36Q-9@gated-at.bofh.it> <sT0LE-36Q-23@gated-at.bofh.it> <t65DQ-86Y-5@gated-at.bofh.it> <t6iKJ-5L-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu 2017-02-02 15:05:38, Sergey Senozhatsky wrote:
> On (02/01/17 11:06), Steven Rostedt wrote:
> [..]
> > >  static void printk_safe_flush_line(const char *text, int len)
> > >  {
> > >  	/*
> > > -	 * The buffers are flushed in NMI only on panic.  The messages must
> > > -	 * go only into the ring buffer at this stage.  Consoles will get
> > > -	 * explicitly called later when a crashdump is not generated.
> > > +	 * Avoid any console drivers calls from here, because we may be
> > > +	 * in NMI or printk_safe context (when in panic). The messages
> > > +	 * must go only into the ring buffer at this stage.  Consoles will
> > > +	 * get explicitly called later when a crashdump is not generated.
> > >  	 */
> > > -	if (in_nmi())
> > > -		printk_deferred("%.*s", len, text);
> > > -	else
> > > -		printk("%.*s", len, text);
> > > +	printk_deferred("%.*s", len, text);
> > >  }
> > 
> > The helper function was there because of the if statement. Just nuke
> > this function and call printk_deferred() directly. You can move the
> > comment to the caller.
> 
> indeed. thanks.
> 
> Petr, how would you prefer to handle this?

I am still learning how to manage the patches in the printk.git tree.

I would like to add Steven's Reviewed-by tags, links to the mails,
and list of CC-ed people. IMHO, the only way is to rebase the for-4.11
and for-next branches. Then I could do the above suggested change during
the rebase.

Any other solutions are welcome. I will wait with the rebase at least
until Monday. We are discussing the lockdep in the 6th patch anyway.

Best Regards,
Petr

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


Thread

Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Steven Rostedt <rostedt@goodmis.org> - 2017-02-01 17:10 +0100
  Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-02-02 07:10 +0100
    Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Petr Mladek <pmladek@suse.com> - 2017-02-02 16:40 +0100
      Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Petr Mladek <pmladek@suse.com> - 2017-02-02 17:00 +0100
        Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-02-03 03:10 +0100
          Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Petr Mladek <pmladek@suse.com> - 2017-02-03 12:20 +0100
            Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-02-06 02:50 +0100
              Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-02-06 03:10 +0100
                Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Petr Mladek <pmladek@suse.com> - 2017-02-06 13:20 +0100
                Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Steven Rostedt <rostedt@goodmis.org> - 2017-02-06 14:30 +0100
                Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Sergey Senozhatsky <sergey.senozhatsky@gmail.com> - 2017-02-06 17:50 +0100
                Re: [PATCHv7 4/8] printk: always use deferred printk when flush  printk_safe lines Steven Rostedt <rostedt@goodmis.org> - 2017-02-06 18:00 +0100

csiph-web