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

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

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

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 :) >> >>

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

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 t...@linutronix.de 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

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

2013-02-26 Thread Frederic Weisbecker
2013/2/26 Thomas Gleixner t...@linutronix.de: On Fri, 22 Feb 2013, Linus Torvalds wrote: On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner t...@linutronix.de 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

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 t...@linutronix.de: On Fri, 22 Feb 2013, Linus Torvalds wrote: On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner t...@linutronix.de wrote: I prefer to let you guys have the final word on this patch. Whether

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

2013-02-26 Thread Frederic Weisbecker
2013/2/26 Thomas Gleixner t...@linutronix.de: On Tue, 26 Feb 2013, Frederic Weisbecker wrote: 2013/2/26 Thomas Gleixner t...@linutronix.de: On Fri, 22 Feb 2013, Linus Torvalds wrote: On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner t...@linutronix.de wrote: I prefer to let you

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 t...@linutronix.de: On Fri, 22 Feb 2013, Linus Torvalds wrote: On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner t...@linutronix.de wrote:

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 a right place

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-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 -

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

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 t...@linutronix.de 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

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 fweis...@gmail.com 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

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

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

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

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

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 under

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 softirqs

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 taken care

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 t...@linutronix.de 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

[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

[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