From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Jan Beulich <JBeulich@novell.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
"Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
Tom Kopec <tek@acm.org>,
Daniel Stodden <Daniel.Stodden@citrix.com>
Subject: Re: [GIT PULL] Fix lost interrupt race in Xen event channels
Date: Mon, 30 Aug 2010 10:15:42 +0100 [thread overview]
Message-ID: <C8A1354E.2155C%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <4C7B909F0200007800012C52@vpn.id2.novell.com>
On 30/08/2010 10:06, "Jan Beulich" <JBeulich@novell.com> wrote:
> However, do you also think that pirq_unmask_and_notify() is safe
> to be called twice? I would think the double EOI potentially sent to
> Xen could lead to an interrupt getting ack-ed that didn't even get
> started to be serviced yet.
Erm, well if this is a race that happens only occasionally, does it matter?
Worst case you get another interrupt straight away. Only a problem if it
happens often enough to cause a performance issue or even livelock interrupt
storm.
The obvious fix would be for the kernel to privately keep track of which
event channels or pirqs are masked and/or disabled (e.g., with two bitflags
per port). Then have the evtchn_mask flag be the OR of the two. If this is
actually a real problem at all. I doubt move_native_irq() should be doing
work very often when it is called.
-- Keir
> And this, afaict, can happen in 2.6.18
> as well (ack_pirq() -> move_native_irq() -> disable_pirq()/
> enable_pirq() -> pirq_unmask_and_notify() followed by end_pirq()
> -> pirq_unmask_and_notify()). Here, however, you couldn't even
> use the mask bit to detect the situation, since the masking only
> happens after already having called move_native_irq() (i.e. the
> event channel will be masked when you get into
> pirq_unmask_and_notify() the second time).
next prev parent reply other threads:[~2010-08-30 9:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-24 21:35 [GIT PULL] Fix lost interrupt race in Xen event channels Jeremy Fitzhardinge
2010-08-25 7:52 ` [Xen-devel] " Jan Beulich
2010-08-25 10:04 ` Daniel Stodden
2010-08-25 11:24 ` Jan Beulich
2010-08-25 17:54 ` Jeremy Fitzhardinge
2010-08-26 6:46 ` Jan Beulich
2010-08-26 16:32 ` Jeremy Fitzhardinge
2010-08-27 8:56 ` Jan Beulich
2010-08-27 20:43 ` Daniel Stodden
2010-08-27 21:49 ` Daniel Stodden
2010-08-27 23:43 ` Jeremy Fitzhardinge
2010-08-30 8:03 ` Jan Beulich
2010-08-30 8:43 ` Jan Beulich
2010-08-30 8:48 ` Keir Fraser
2010-08-30 9:06 ` Jan Beulich
2010-08-30 9:15 ` Keir Fraser [this message]
2010-08-30 9:22 ` Jan Beulich
2010-08-30 16:36 ` Jeremy Fitzhardinge
2010-08-31 6:38 ` Jan Beulich
2010-09-03 18:46 ` Using handle_fasteoi_irq for pirqs Jeremy Fitzhardinge
2010-09-06 7:58 ` Jan Beulich
2010-09-07 1:53 ` Jeremy Fitzhardinge
2010-09-07 6:58 ` Jan Beulich
2010-09-07 8:02 ` Jeremy Fitzhardinge
2010-09-07 8:58 ` Jan Beulich
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=C8A1354E.2155C%keir.fraser@eu.citrix.com \
--to=keir.fraser@eu.citrix.com \
--cc=Daniel.Stodden@citrix.com \
--cc=JBeulich@novell.com \
--cc=Xen-devel@lists.xensource.com \
--cc=jeremy@goop.org \
--cc=tek@acm.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).