Re: [RFC][PATCH 4/5 v2] printk: Add per_cpu printk func to allow printk to be diverted

2014-06-27 Thread Petr Mládek
On Fri 2014-06-27 10:39:33, Steven Rostedt wrote: > On Fri, 27 Jun 2014 16:20:25 +0200 > Petr Mládek wrote: > > > > > va_start(args, fmt); > > > - r = vprintk_emit(0, -1, NULL, 0, fmt, args); > > > + preempt_disable(); > > > > I think that it is too late to disable the preemption here. > > It

Re: [RFC][PATCH 4/5 v2] printk: Add per_cpu printk func to allow printk to be diverted

2014-06-27 Thread Steven Rostedt
On Fri, 27 Jun 2014 16:20:25 +0200 Petr Mládek wrote: > > va_start(args, fmt); > > - r = vprintk_emit(0, -1, NULL, 0, fmt, args); > > + preempt_disable(); > > I think that it is too late to disable the preemption here. > It has to be done by the printk() caller if it wants to be sure >

Re: [RFC][PATCH 4/5 v2] printk: Add per_cpu printk func to allow printk to be diverted

2014-06-27 Thread Petr Mládek
On Thu 2014-06-26 17:49:05, Steven Rostedt wrote: > From: "Steven Rostedt (Red Hat)" > > Being able to divert printk to call another function besides the normal > logging is useful for such things like NMI handling. If some functions > are to be called from NMI that does printk() it is possible t

[RFC][PATCH 4/5 v2] printk: Add per_cpu printk func to allow printk to be diverted

2014-06-26 Thread Steven Rostedt
From: "Steven Rostedt (Red Hat)" Being able to divert printk to call another function besides the normal logging is useful for such things like NMI handling. If some functions are to be called from NMI that does printk() it is possible to lock up the box if the nmi handler triggers when another p