xen-devel
[Xen-devel] RE: [PATCH v2 2/2] x86: don't unmask disabled irqs when migr
To: |
"Tian, Kevin" <kevin.tian@xxxxxxxxx> |
Subject: |
[Xen-devel] RE: [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them |
From: |
Thomas Gleixner <tglx@xxxxxxxxxxxxx> |
Date: |
Fri, 6 May 2011 15:24:06 +0200 (CEST) |
Cc: |
"xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "linux-kernel@xxxxxxxxxxxxxxx" <linux-kernel@xxxxxxxxxxxxxxx>, "JBeulich@xxxxxxxxxx" <JBeulich@xxxxxxxxxx>, Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, "mingo@xxxxxxxxxx" <mingo@xxxxxxxxxx>, "hpa@xxxxxxxxx" <hpa@xxxxxxxxx> |
Delivery-date: |
Fri, 06 May 2011 06:24:52 -0700 |
Envelope-to: |
www-data@xxxxxxxxxxxxxxxxxxx |
In-reply-to: |
<625BA99ED14B2D499DC4E29D8138F1505C8ED7F962@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
List-help: |
<mailto:xen-devel-request@lists.xensource.com?subject=help> |
List-id: |
Xen developer discussion <xen-devel.lists.xensource.com> |
List-post: |
<mailto:xen-devel@lists.xensource.com> |
List-subscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
List-unsubscribe: |
<http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
References: |
<625BA99ED14B2D499DC4E29D8138F1505C8ED7F7E3@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <alpine.LFD.2.02.1105061149330.3005@ionos> <625BA99ED14B2D499DC4E29D8138F1505C8ED7F962@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
Sender: |
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
User-agent: |
Alpine 2.02 (LFD 1266 2009-07-14) |
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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them, Tian, Kevin
- [Xen-devel] RE: [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them, Stefano Stabellini
- [Xen-devel] RE: [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them, Tian, Kevin
- [Xen-devel] RE: [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them, Tian, Kevin
- [Xen-devel] RE: [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them, Stefano Stabellini
- [Xen-devel] RE: [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them, Thomas Gleixner
- [Xen-devel] RE: [PATCH v2 2/2] x86: don't unmask disabled irqs when migrating them, Tian, Kevin
|
|
|