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


Groups > linux.kernel > #1550804

Re: [PATCHv7 3/8] printk: introduce per-cpu safe_print seq buffer

From Petr Mladek <pmladek@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCHv7 3/8] printk: introduce per-cpu safe_print seq buffer
Date 2017-01-04 14:50 +0100
Message-ID <sVU70-5lr-27@gated-at.bofh.it> (permalink)
References <sT0LE-36Q-9@gated-at.bofh.it> <sT0LE-36Q-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 2016-12-27 23:16:06, Sergey Senozhatsky wrote:
> This patch extends the idea of NMI per-cpu buffers to regions
> that may cause recursive printk() calls and possible deadlocks.
> Namely, printk() can't handle printk calls from schedule code
> or printk() calls from lock debugging code (spin_dump() for instance);
> because those may be called with `sem->lock' already taken or any
> other `critical' locks (p->pi_lock, etc.). An example of deadlock
> can be
> 
> Usage example:
> 
>  printk()
>   printk_safe_enter_irqsave(flags)
>   //
>   //  any printk() call from here will endup in vprintk_safe(),
>   //  that stores messages in a special per-CPU buffer.
>   //
>   printk_safe_exit_irqrestore(flags)
> 
> Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

I really like the new variants for printk_safe_enter/exit and
different IRQ context.

Reviewed-by: Petr Mladek <pmladek@suse.com>

Best Regards,
Petr

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


Thread

Re: [PATCHv7 3/8] printk: introduce per-cpu safe_print seq buffer Petr Mladek <pmladek@suse.com> - 2017-01-04 14:50 +0100
  Re: [PATCHv7 3/8] printk: introduce per-cpu safe_print seq buffer Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2017-01-05 02:10 +0100

csiph-web