Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-11 Thread Preeti U Murthy
On 05/11/2014 03:55 AM, Benjamin Herrenschmidt wrote: On Sat, 2014-05-10 at 21:06 +0530, Preeti U Murthy wrote: On 05/10/2014 09:56 AM, Benjamin Herrenschmidt wrote: On Fri, 2014-05-09 at 15:22 +0530, Preeti U Murthy wrote: in __timer_interrupt() outside the _else_ loop? This will ensure that

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-11 Thread Benjamin Herrenschmidt
On Sun, 2014-05-11 at 13:45 +0530, Preeti U Murthy wrote: + /* Don't adjust the decrementer if some irq work is pending */ + if (!test_irq_work_pending()) + set_dec(evt); + else + set_dec(1); ^ your patch currently

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-11 Thread Preeti U Murthy
On 05/11/2014 02:07 PM, Benjamin Herrenschmidt wrote: On Sun, 2014-05-11 at 13:45 +0530, Preeti U Murthy wrote: + /* Don't adjust the decrementer if some irq work is pending */ + if (!test_irq_work_pending()) + set_dec(evt); + else +

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-11 Thread Benjamin Herrenschmidt
On Sun, 2014-05-11 at 14:13 +0530, Preeti U Murthy wrote: Isn't this patch required too? @@ -503,12 +503,13 @@ void __timer_interrupt(void) now = *next_tb - now; if (now = DECREMENTER_MAX) set_dec((int)now); - /* We

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-11 Thread Preeti U Murthy
On 05/11/2014 02:33 PM, Benjamin Herrenschmidt wrote: On Sun, 2014-05-11 at 14:13 +0530, Preeti U Murthy wrote: Isn't this patch required too? @@ -503,12 +503,13 @@ void __timer_interrupt(void) now = *next_tb - now; if (now = DECREMENTER_MAX)

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-10 Thread Paul Mackerras
On Fri, May 09, 2014 at 03:08:45PM -0700, Paul E. McKenney wrote: On Fri, May 09, 2014 at 11:50:05PM +0200, Gabriel Paubert wrote: On Fri, May 09, 2014 at 06:41:13AM -0700, Paul E. McKenney wrote: On Fri, May 09, 2014 at 05:47:12PM +1000, Anton Blanchard wrote: I am seeing an issue where

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-10 Thread Preeti U Murthy
On 05/10/2014 09:56 AM, Benjamin Herrenschmidt wrote: On Fri, 2014-05-09 at 15:22 +0530, Preeti U Murthy wrote: in __timer_interrupt() outside the _else_ loop? This will ensure that no matter what, before exiting timer interrupt handler we check for pending irq work. We still need to make

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-10 Thread Paul E. McKenney
On Sat, May 10, 2014 at 04:33:37PM +1000, Paul Mackerras wrote: On Fri, May 09, 2014 at 03:08:45PM -0700, Paul E. McKenney wrote: On Fri, May 09, 2014 at 11:50:05PM +0200, Gabriel Paubert wrote: On Fri, May 09, 2014 at 06:41:13AM -0700, Paul E. McKenney wrote: On Fri, May 09, 2014 at

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-10 Thread Benjamin Herrenschmidt
On Sat, 2014-05-10 at 21:06 +0530, Preeti U Murthy wrote: On 05/10/2014 09:56 AM, Benjamin Herrenschmidt wrote: On Fri, 2014-05-09 at 15:22 +0530, Preeti U Murthy wrote: in __timer_interrupt() outside the _else_ loop? This will ensure that no matter what, before exiting timer interrupt

[PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-09 Thread Anton Blanchard
I am seeing an issue where a CPU running perf eventually hangs. Traces show timer interrupts happening every 4 seconds even when a userspace task is running on the CPU. /proc/timer_list also shows pending hrtimers have not run in over an hour, including the scheduler. Looking closer,

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-09 Thread Preeti U Murthy
Hi Anton, On 05/09/2014 01:17 PM, Anton Blanchard wrote: I am seeing an issue where a CPU running perf eventually hangs. Traces show timer interrupts happening every 4 seconds even when a userspace task is running on the CPU. /proc/timer_list also shows pending hrtimers have not run in over

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-09 Thread Paul E. McKenney
On Fri, May 09, 2014 at 05:47:12PM +1000, Anton Blanchard wrote: I am seeing an issue where a CPU running perf eventually hangs. Traces show timer interrupts happening every 4 seconds even when a userspace task is running on the CPU. Is this by chance every 4.2 seconds? The reason I ask is

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-09 Thread Paul E. McKenney
On Fri, May 09, 2014 at 11:50:05PM +0200, Gabriel Paubert wrote: On Fri, May 09, 2014 at 06:41:13AM -0700, Paul E. McKenney wrote: On Fri, May 09, 2014 at 05:47:12PM +1000, Anton Blanchard wrote: I am seeing an issue where a CPU running perf eventually hangs. Traces show timer interrupts

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-09 Thread Gabriel Paubert
On Fri, May 09, 2014 at 06:41:13AM -0700, Paul E. McKenney wrote: On Fri, May 09, 2014 at 05:47:12PM +1000, Anton Blanchard wrote: I am seeing an issue where a CPU running perf eventually hangs. Traces show timer interrupts happening every 4 seconds even when a userspace task is running on

Re: [PATCH] powerpc: irq work racing with timer interrupt can result in timer interrupt hang

2014-05-09 Thread Benjamin Herrenschmidt
On Fri, 2014-05-09 at 15:22 +0530, Preeti U Murthy wrote: in __timer_interrupt() outside the _else_ loop? This will ensure that no matter what, before exiting timer interrupt handler we check for pending irq work. We still need to make sure that set_next_event() doesn't move the dec beyond the