public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andi Kleen <andi@firstfloor.org>, Avi Kivity <avi@qumranet.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Keir Fraser <Keir.Fraser@eu.citrix.com>
Subject: Re: Question about interrupt routing and irq allocation
Date: Wed, 28 May 2008 09:04:19 -0700	[thread overview]
Message-ID: <m13ao28lfg.fsf@frodo.ebiederm.org> (raw)
In-Reply-To: <483D3697.1070702@goop.org> (Jeremy Fitzhardinge's message of "Wed, 28 May 2008 11:40:23 +0100")

Jeremy Fitzhardinge <jeremy@goop.org> writes:

> Eric W. Biederman wrote:
>> - I think using create_irq is a good step.
>> - I think all vectors are wasted in the case of Xen.
>>
>
> The case I'm discussing now is in hvm domains - ie, fully virtualized PC
> platform. I'm adding a driver to poke a hole through all the emulated hardware
> to get directly to the underlying Xen layer so that we can run paravirtual
> drivers to get better performance. Only the irqs associated with pv drivers will
> waste their vectors.

I see. The fully virtualized machine case.  So we do have apics
visible to us.

>> - I think we want a individual irq for each xen irq source.
>>   Sparc already does a demux in similar circumstances with
>>   a queue of received MSI messages an a single cpu irq
>>   that these get demuxed from.
>>   If we don't have individual irqs per drivers it will be hard
>>   to share a source base with native drivers.
>>
>
> In this case the sharing is between fully paravirtualized paravirt_ops Xen and
> pv-on-hvm drivers. In general I want those drivers to look as normal as
> possible, so they should use irqs in a normal way.

Right.  We should be able to assume that the native irqs for
those devices are not shared, and we should be able to extend
that property (among others) to the virtualzed irqs for the
devices.

Under other hypervisors sparc, ppc we can run unmodified pci
drivers just the OS platform code changes.  How close to that
can we come in the Xen case?

I think running unmodified drivers with the OS platform code doing
the adaption should be the goal, unless there is a real need for
the driver to know about Xen.  Is that compatible with what you
are trying to achieve?

>> - I think it would be very nice if we could get irqs allocated
>>   in request_irq instead of create_irq (and equivalents).
>>
>
> Something along the lines of passing -1 as the irq, and it would return the
> allocated irq? It's not clear to me how all that would fit together.

Groan.  I mispoke.  I meant:
- I think it would be very nice if we could get vectors allocated
  in request_irq instead of in create_irq (and equivalents).

Just delayed vector allocation.  I wasn't after something driver
visible.

>> - I think ultimately it makes sense to port the per vector
>>   code to 32bit linux.  On single cpu systems the cost should
>>   be just a hair more code, but no extra data structures.  We
>>   can easily restrict the irq allocation to allocating the same
>>   vector on all cpus for any old machines that prove flaky with
>>   irq migration.
>>
>>   The code between the two architectures we kept fairly close
>>   in sync when I worked on it so a merge should not be a big deal.
>
> Well, if I find myself at a loose end, I'll have a look at it.

Thanks.

Eric


      reply	other threads:[~2008-05-28 16:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-26 22:08 Question about interrupt routing and irq allocation Jeremy Fitzhardinge
2008-05-27  8:37 ` Ingo Molnar
2008-05-27  9:45   ` Jeremy Fitzhardinge
2008-05-27 14:56     ` Ingo Molnar
2008-05-27 16:24       ` Jeremy Fitzhardinge
2008-05-28  9:35         ` Eric W. Biederman
2008-05-28 10:40           ` Jeremy Fitzhardinge
2008-05-28 16:04             ` Eric W. Biederman [this message]

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=m13ao28lfg.fsf@frodo.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=Keir.Fraser@eu.citrix.com \
    --cc=andi@firstfloor.org \
    --cc=avi@qumranet.com \
    --cc=hpa@zytor.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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