Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-26 Thread Paul E. McKenney
On Tue, Feb 26, 2013 at 07:55:06PM +0100, Thomas Gleixner wrote: > On Tue, 26 Feb 2013, Paul E. McKenney wrote: > > On Tue, Feb 26, 2013 at 04:14:43PM +0100, Thomas Gleixner wrote: > > > > > > On Tue, 26 Feb 2013, Frederic Weisbecker wrote: > > > > And what do you think about Linus's idea to move

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-26 Thread Thomas Gleixner
On Tue, 26 Feb 2013, Paul E. McKenney wrote: > On Tue, Feb 26, 2013 at 04:14:43PM +0100, Thomas Gleixner wrote: > > > > On Tue, 26 Feb 2013, Frederic Weisbecker wrote: > > > And what do you think about Linus's idea to move tick_nohz_irq_exit() > > > to do_softirq()? > > > This sounds feasible and

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-26 Thread Paul E. McKenney
On Tue, Feb 26, 2013 at 04:14:43PM +0100, Thomas Gleixner wrote: > > On Tue, 26 Feb 2013, Frederic Weisbecker wrote: > > > 2013/2/26 Thomas Gleixner : > > > On Fri, 22 Feb 2013, Linus Torvalds wrote: > > >> On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner > > >> wrote: > > >> >> > > >> >> I pre

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-26 Thread Frederic Weisbecker
2013/2/26 Thomas Gleixner : > > On Tue, 26 Feb 2013, Frederic Weisbecker wrote: > >> 2013/2/26 Thomas Gleixner : >> > On Fri, 22 Feb 2013, Linus Torvalds wrote: >> >> On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner >> >> wrote: >> >> >> >> >> >> I prefer to let you guys have the final word on th

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-26 Thread Thomas Gleixner
On Tue, 26 Feb 2013, Frederic Weisbecker wrote: > 2013/2/26 Thomas Gleixner : > > On Fri, 22 Feb 2013, Linus Torvalds wrote: > >> On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner > >> wrote: > >> >> > >> >> I prefer to let you guys have the final word on this patch. Whether you > >> >> apply it

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-26 Thread Frederic Weisbecker
2013/2/26 Thomas Gleixner : > On Fri, 22 Feb 2013, Linus Torvalds wrote: >> On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner wrote: >> >> >> >> I prefer to let you guys have the final word on this patch. Whether you >> >> apply it or not, I fear I'll never be entirely happy either way :) >> >> Tha

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-26 Thread Thomas Gleixner
On Fri, 22 Feb 2013, Linus Torvalds wrote: > On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner wrote: > >> > >> I prefer to let you guys have the final word on this patch. Whether you > >> apply it or not, I fear I'll never be entirely happy either way :) > >> That's the sad fate of dealing with ci

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-23 Thread Linus Torvalds
On Sat, Feb 23, 2013 at 10:21 AM, Frederic Weisbecker wrote: > > But tick_nohz_irq_exit() may trigger the timer softirq itself. Suggestion: merge it with the whole softirq handler. The softirq code *already* knows about the whole "oops, one softirq may trigger another" issue, and has a loop - wi

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-23 Thread Frederic Weisbecker
On Fri, Feb 22, 2013 at 01:08:17PM -0800, Linus Torvalds wrote: > On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner wrote: > >> > >> I prefer to let you guys have the final word on this patch. Whether you > >> apply it or not, I fear I'll never be entirely happy either way :) > >> That's the sad fa

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-22 Thread Linus Torvalds
On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner wrote: >> >> I prefer to let you guys have the final word on this patch. Whether you >> apply it or not, I fear I'll never be entirely happy either way :) >> That's the sad fate of dealing with circular dependencies... > > plus the butt ugly softirq

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-22 Thread Thomas Gleixner
On Fri, 22 Feb 2013, Frederic Weisbecker wrote: > On Fri, Feb 22, 2013 at 03:33:51PM +0100, Thomas Gleixner wrote: > > The minimal extra check at the end of irq_exit() is way better than > > any other special cased workaround and the softirq stuff is really the > > only thing which needs to be take

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-22 Thread Frederic Weisbecker
On Fri, Feb 22, 2013 at 03:33:51PM +0100, Thomas Gleixner wrote: > On Fri, 22 Feb 2013, Frederic Weisbecker wrote: > > The irq code is run under HARDIRQ_OFFSET preempt offset until > > we reach the softirq code. Then it's substracted, leaving the > > preempt count to 0, whether we have pending soft

Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-22 Thread Thomas Gleixner
On Fri, 22 Feb 2013, Frederic Weisbecker wrote: > The irq code is run under HARDIRQ_OFFSET preempt offset until > we reach the softirq code. Then it's substracted, leaving the > preempt count to 0, whether we have pending softirqs or not. > > Afterward, if we have softirqs to run, we'll run them u

[PATCH 2/2] irq: Cleanup context state transitions in irq_exit()

2013-02-21 Thread Frederic Weisbecker
The irq code is run under HARDIRQ_OFFSET preempt offset until we reach the softirq code. Then it's substracted, leaving the preempt count to 0, whether we have pending softirqs or not. Afterward, if we have softirqs to run, we'll run them under the SOFTIRQ_OFFSET then set the preempt offset back t