Re: [PATCH RFC] irq_work: Flush work on CPU_DYING (was: Re: [PATCH 7/7] printk: Wake up klogd using irq_work)

2012-11-15 Thread Steven Rostedt
On Thu, 2012-11-15 at 13:13 -0500, Steven Rostedt wrote: > > + > > +/* > > + * Run the irq_work entries on this cpu. Requires to be ran from hardirq > > + * context with local IRQs disabled. > > + */ > > +void irq_work_run(void) > > +{ > > + BUG_ON(!in_irq()); > > + __irq_work_run(); > > +} >

Re: [PATCH RFC] irq_work: Flush work on CPU_DYING (was: Re: [PATCH 7/7] printk: Wake up klogd using irq_work)

2012-11-15 Thread Steven Rostedt
On Thu, 2012-11-15 at 11:34 -0500, Steven Rostedt wrote: Frederic, Please add this one fix below: > Index: linux-rt.git/kernel/irq_work.c > === > --- linux-rt.git.orig/kernel/irq_work.c > +++ linux-rt.git/kernel/irq_work.c > @@ -14

Re: [PATCH RFC] irq_work: Flush work on CPU_DYING (was: Re: [PATCH 7/7] printk: Wake up klogd using irq_work)

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Steven Rostedt : > On Thu, 2012-11-15 at 16:25 +0100, Frederic Weisbecker wrote: >> 2012/11/15 Steven Rostedt : >> > On Wed, 2012-11-14 at 21:37 +0100, Frederic Weisbecker wrote: >> >> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c >> >> index f249e8c..822d757 100644 >>

[PATCH RFC] irq_work: Flush work on CPU_DYING (was: Re: [PATCH 7/7] printk: Wake up klogd using irq_work)

2012-11-15 Thread Steven Rostedt
On Thu, 2012-11-15 at 16:25 +0100, Frederic Weisbecker wrote: > 2012/11/15 Steven Rostedt : > > On Wed, 2012-11-14 at 21:37 +0100, Frederic Weisbecker wrote: > >> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c > >> index f249e8c..822d757 100644 > >> --- a/kernel/time/tick-sched.c

Re: [PATCH 7/7] printk: Wake up klogd using irq_work

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Frederic Weisbecker : > -> > CPU that offilines CPU offlining > - > - > cpu_down() { > __stop_machine(take_cpu_down) > > take_cpu_down() { > > __cpu_disable() { > > * disable irqs in hw > > * cle

Re: [PATCH 7/7] printk: Wake up klogd using irq_work

2012-11-15 Thread Frederic Weisbecker
2012/11/15 Steven Rostedt : > On Wed, 2012-11-14 at 21:37 +0100, Frederic Weisbecker wrote: >> diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c >> index f249e8c..822d757 100644 >> --- a/kernel/time/tick-sched.c >> +++ b/kernel/time/tick-sched.c >> @@ -289,7 +289,7 @@ static ktime_t

Re: [PATCH 7/7] printk: Wake up klogd using irq_work

2012-11-14 Thread Steven Rostedt
On Wed, 2012-11-14 at 21:37 +0100, Frederic Weisbecker wrote: > klogd is woken up asynchronously from the tick in order > to do it safely. > > However if printk is called when the tick is stopped, the reader > won't be woken up until the next interrupt, which might not fire > for a while. As a res

[PATCH 7/7] printk: Wake up klogd using irq_work

2012-11-14 Thread Frederic Weisbecker
klogd is woken up asynchronously from the tick in order to do it safely. However if printk is called when the tick is stopped, the reader won't be woken up until the next interrupt, which might not fire for a while. As a result, the user may miss some message. To fix this, lets implement the prin

[PATCH 7/7] printk: Wake up klogd using irq_work

2012-11-08 Thread Frederic Weisbecker
klogd is woken up asynchronously from the tick in order to do it safely. However if printk is called when the tick is stopped, the reader won't be woken up until the next interrupt, which might not fire for a while. As a result, the user may miss some message. To fix this, lets implement the prin