All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Jan Beulich <JBeulich@novell.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
	"Xen-devel@lists.xensource.com" <Xen-devel@lists.xensource.com>,
	Tom Kopec <tek@acm.org>,
	Daniel Stodden <daniel.stodden@citrix.com>
Subject: Using handle_fasteoi_irq for pirqs
Date: Fri, 03 Sep 2010 11:46:16 -0700	[thread overview]
Message-ID: <4C814278.5070904@goop.org> (raw)
In-Reply-To: <4C74E7C802000078000120C0@vpn.id2.novell.com>

 On 08/25/2010 12:52 AM, Jan Beulich wrote:
> I do however agree that using handle_level_irq() is problematic
> (see http://lists.xensource.com/archives/html/xen-devel/2010-04/msg01178.html),
> but as said there I think using the fasteoi logic is preferable.

I've been looking at this again.

For non-pirq interrupts, fasteoi seems like a solid win.  It looks like
an overall simplification and I haven't seen any problems.

However, I've had more trouble extending this to pirq.  My first attempt
appeared to work in emulation, but when I run it on real hardware, msi
interrupts are not getting through.  If I boot with "pci=nomsi" then it
sometimes works, but it often crashes Xen (see separate mail).

Part of the problem is that I'm not really sure what the various
irq_chip functions are really supposed to do, and the documentation is
awful.

.startup and .shutdown I understand, and I think they're being called
when we expect them to be (ie, when the driver registers an irq for the
first time.

Using .startup/.shutdown for enable/disable seems very heavyweight.  Do
we really want to be rebinding the pirq each time?  Isn't unmask/masking
the event channel sufficient?


At the moment my xen_evtchn_do_upcall() is masking and clearing the
event channel before calling into generic_handle_irq_desc(), which will
call handle_fasteoi_irq fairly directly.  That runs straight through and
the priq_chip's eoi just does an EOI on the pirq if Xen says it needs one.

But apparently this isn't enough.  Is there anything else I should be doing?

(I just implemented PHYSDEVOP_pirq_eoi_gmfn method of getting the pirq
eoi flags, but I haven't tested it yet.  I'm also not really sure what
the advantage of it is.)

Thanks,
    J

  parent reply	other threads:[~2010-09-03 18:46 UTC|newest]

Thread overview: 27+ 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-24 21:35 ` 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-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
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   ` Jeremy Fitzhardinge [this message]
2010-09-06  7:58     ` Using handle_fasteoi_irq for pirqs 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=4C814278.5070904@goop.org \
    --to=jeremy@goop.org \
    --cc=JBeulich@novell.com \
    --cc=Xen-devel@lists.xensource.com \
    --cc=daniel.stodden@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.