From: Thomas Gleixner <tglx@linutronix.de>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"mingo@redhat.com" <mingo@redhat.com>,
"hpa@zytor.com" <hpa@zytor.com>,
Ian Campbell <Ian.Campbell@eu.citrix.com>,
"JBeulich@novell.com" <JBeulich@novell.com>,
"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Subject: RE: [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them
Date: Fri, 6 May 2011 15:24:06 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1105061505010.3005@ionos> (raw)
In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1505C8ED7F962@shsmsx502.ccr.corp.intel.com>
On Fri, 6 May 2011, Tian, Kevin wrote:
> > From: Thomas Gleixner
> > Sent: Friday, May 06, 2011 6:00 PM
> >
> > On Fri, 6 May 2011, Tian, Kevin wrote:
> > > x86: don't unmask disabled irqs when migrating them
> > >
> > > it doesn't make sense to mask/unmask a disabled irq when migrating it
> > > from offlined cpu to another, because it's not expected to handle any
> > > instance of it. Current mask/set_affinity/unmask steps may trigger
> > > unexpected instance on disabled irq which then simply bug on when
> > > there is no handler for it. One failing example is observed in Xen.
> > > Xen pvops
> >
> > So there is no handler, why the heck is there an irq action?
> >
> > if (!irq_has_action(irq) ....
> > continue;
> >
> > Should have caught an uninitialized interrupt. If Xen abuses interrupts that way,
> > then it rightfully explodes. And we do not fix it by magic somewhere else.
>
> sorry that my bad description here. there does be a dummy handler registered
> on such irqs which simply throws out a BUG_ON when hit. I should just say such
> injection is not expected instead of no handler. :-)
So can please someone point me to that particular incarnation of
nonsense and provide a reasonable explanation for this abuse?
What is the point of an interrupt, which is permanently disabled, has
a handler with a BUG() inside and an irqaction assigned ?
What's the purpose of this? Why is the irqaction there in the first
place? To be called by some other weird means than by the irq
handling code?
> > The only conditional which is interesting is the unmask path and that's a simple
> > optimization and not a correctness problem.
> >
>
> So what's your suggestion based on my updated information? Is there any
> interface I may take to differentiate above exception with normal case? Basically
> in Xen usage we want such irqs permanently disabled at the chip level. Or
> could we only do mask/unmask for irqs which are unmasked atm if as you said
> it's just an optimization step? :-)
No we can make the unmask conditional on !irqd_irq_disabled() because
that's not violating any of the semantics. The interrupt would be
masked anyway when it arrives and the handler code sees that it is
lazy disabled. I mean real handler code, not the Xen abomination.
The only valid reason why I'd apply that patch is that it avoids a
potential extra interrupt, but not to prevent screwed up handlers from
exploding.
Thanks,
tglx
next prev parent reply other threads:[~2011-05-06 13:24 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 6:43 [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them Tian, Kevin
2011-05-06 9:59 ` Thomas Gleixner
2011-05-06 12:54 ` Tian, Kevin
2011-05-06 13:14 ` [Xen-devel] " Tian, Kevin
2011-05-06 13:24 ` Thomas Gleixner [this message]
2011-05-06 14:04 ` Ian Campbell
2011-05-08 1:44 ` Jeremy Fitzhardinge
2011-05-09 0:44 ` Tian, Kevin
2011-05-09 1:45 ` Jeremy Fitzhardinge
2011-05-06 14:28 ` Stefano Stabellini
2011-05-06 21:43 ` Tian, Kevin
2011-05-09 2:11 ` Tian, Kevin
2011-05-09 12:02 ` Stefano Stabellini
2011-05-09 12:36 ` Thomas Gleixner
2011-05-10 3:24 ` Tian, Kevin
2011-05-18 23:49 ` Tian, Kevin
2011-05-19 12:08 ` Stefano Stabellini
2011-05-19 16:18 ` Konrad Rzeszutek Wilk
2011-08-29 4:15 ` [regression] Ideapad S10-3 does not wake up from suspend (Re: [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them) Jonathan Nieder
2011-08-31 1:04 ` Dave Hansen
2011-08-31 8:22 ` Jonathan Nieder
2011-09-02 3:01 ` Serge E. Hallyn
2011-09-01 6:24 ` Tian, Kevin
2012-05-12 23:13 ` [regression] Ideapad S10-3 does not wake up from suspend Jonathan Nieder
2012-05-13 1:22 ` Lars Boegild Thomsen
2012-07-15 23:24 ` Jonathan Nieder
2012-04-15 14:06 ` Jonathan Nieder
2012-04-16 18:05 ` Robert Scott
2012-04-17 2:04 ` Jonathan Nieder
2012-04-18 10:03 ` Lars Boegild Thomsen
2012-04-22 16:34 ` [Xen-devel] " Pasi Kärkkäinen
2012-04-21 13:14 ` Robert Scott
2012-05-06 12:44 ` Robert Scott
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=alpine.LFD.2.02.1105061505010.3005@ionos \
--to=tglx@linutronix.de \
--cc=Ian.Campbell@eu.citrix.com \
--cc=JBeulich@novell.com \
--cc=hpa@zytor.com \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=xen-devel@lists.xensource.com \
/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).