[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170105010144.GC480@jagdpanzerIV.localdomain>
Date: Thu, 5 Jan 2017 10:01:45 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Petr Mladek <pmladek@...e.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jan Kara <jack@...e.cz>, Tejun Heo <tj@...nel.org>,
Calvin Owens <calvinowens@...com>,
Steven Rostedt <rostedt@...dmis.org>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Andy Lutomirski <luto@...nel.org>,
Peter Hurley <peter@...leysoftware.com>,
linux-kernel@...r.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Subject: Re: [PATCHv7 3/8] printk: introduce per-cpu safe_print seq buffer
On (01/04/17 14:31), Petr Mladek wrote:
> 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@...il.com>
>
> I really like the new variants for printk_safe_enter/exit and
> different IRQ context.
>
> Reviewed-by: Petr Mladek <pmladek@...e.com>
thanks.
-ss
Powered by blists - more mailing lists