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 11:59:58 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1105061149330.3005@ionos> (raw)
In-Reply-To: <625BA99ED14B2D499DC4E29D8138F1505C8ED7F7E3@shsmsx502.ccr.corp.intel.com>
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.
> guest marks a special type of irqs as disabled, which are simply used
As I explained before several times, IRQF_DISABLED has absolutely
nothing to do with it and pvops _CANNOT_ mark an interrupt disabled.
>
> chip = irq_data_get_irq_chip(data);
> - if (!irqd_can_move_in_process_context(data) && chip->irq_mask)
> + do_mask = !irqd_irq_disabled(data) &&
> + !irqd_can_move_in_process_context(data) && chip->irq_mask;
> + if (do_mask)
> chip->irq_mask(data);
This is completely wrong. irqd_irq_disabled() is a status information
which does not tell you whether the interrupt is actually masked at
the hardware level because we do lazy interrupt hardware masking. So
your change would keep the line unmasked at the hardware level for all
interrupts which are in the lazy disabled state.
The only conditional which is interesting is the unmask path and
that's a simple optimization and not a correctness problem.
Thanks,
tglx
next prev parent reply other threads:[~2011-05-06 9:59 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 [this message]
2011-05-06 12:54 ` Tian, Kevin
2011-05-06 13:14 ` [Xen-devel] " Tian, Kevin
2011-05-06 13:24 ` Thomas Gleixner
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.1105061149330.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).