linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 2/2] irq: Cleanup context state transitions in irq_exit()
Date: Tue, 26 Feb 2013 08:39:11 -0800	[thread overview]
Message-ID: <20130226163911.GA3309@linux.vnet.ibm.com> (raw)
In-Reply-To: <alpine.LFD.2.02.1302261614060.22263@ionos>

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 <tglx@linutronix.de>:
> > > On Fri, 22 Feb 2013, Linus Torvalds wrote:
> > >> On Fri, Feb 22, 2013 at 7:06 AM, Thomas Gleixner <tglx@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 ugly softirq semantics or the lack thereof ...
> > >>
> > >> The softirq semantics are perfectly fine. Don't blame softirq for the
> > >> fact that irq_exit() has had shit-for-brains for a long time.
> > >>
> > >> Just move the whole "invoke_softirq()" thing down to *after* the
> > >> tick_nohz_irq_exit() stuff.
> > >
> > > We can't move tick_nohz_irq_exit() before invoke_softirq() simply
> > > because we need to take the timers into account for NOHZ and those can
> > > change when the softirq code runs.
> > >
> > > So no, we need an extra check after invoke_softirq() and the same is
> > > true for RCU.
> > 
> > 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 to do this, I hope that won't
> > uglify do_softirq() though.
> > I can try something.
> 
> Yeah, looks doable. the rcu stuff needs to go there as well, right?

If it does, it needs to do so in such a way that rcu_irq_enter() and
rcu_irq_exit() nest properly.  One area of concern is the force_irqthreads
case, skips calling do_softirq().  Another area of concern is the
__ARCH_IRQ_EXIT_IRQS_DISABLED case, which calls __do_softirq() rather
than do_softirq().

Or am I missing some adjustment that is to be made when moving rcu_irq_exit()
to do_softirq()?

							Thanx, Paul


  parent reply	other threads:[~2013-02-26 16:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-22  1:36 [PATCH 0/2] irq: Cleanups in irq_exit() Frederic Weisbecker
2013-02-22  1:36 ` [PATCH 1/2] irq: Remove IRQ_EXIT_OFFSET workaround Frederic Weisbecker
2013-02-22  1:36 ` [PATCH 2/2] irq: Cleanup context state transitions in irq_exit() Frederic Weisbecker
2013-02-22 14:33   ` Thomas Gleixner
2013-02-22 15:04     ` Frederic Weisbecker
2013-02-22 15:06       ` Thomas Gleixner
2013-02-22 21:08         ` Linus Torvalds
2013-02-23 18:21           ` Frederic Weisbecker
2013-02-23 19:24             ` Linus Torvalds
2013-02-26 12:15           ` Thomas Gleixner
2013-02-26 14:28             ` Frederic Weisbecker
2013-02-26 15:14               ` Thomas Gleixner
2013-02-26 16:27                 ` Frederic Weisbecker
2013-02-26 16:39                 ` Paul E. McKenney [this message]
2013-02-26 18:55                   ` Thomas Gleixner
2013-02-26 19:17                     ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130226163911.GA3309@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).