All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Ofsthun <sofsthun@virtualiron.com>
To: John Levon <levon@movementarian.org>
Cc: James Harper <james.harper@bendigoit.com.au>,
	xen-devel@lists.xensource.com,
	bart brooks <bart_brooks@hotmail.com>,
	Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: Interrupt to CPU routing in HVM domains - again
Date: Fri, 05 Sep 2008 14:47:49 -0400	[thread overview]
Message-ID: <48C17ED5.8000800@virtualiron.com> (raw)
In-Reply-To: <20080905172848.GD22002@totally.trollied.org.uk>

John Levon wrote:
> On Fri, Sep 05, 2008 at 01:11:41PM -0400, Steve Ofsthun wrote:
> 
>>>> #ifdef IRQ0_SPECIAL_ROUTING
>>>>   /* Force round-robin to pick VCPU 0 */
>>>>   if ( ((irq == hvm_isa_irq_to_gsi(0)) && pit_channel0_enabled()) ||
>>>>        is_hvm_callback_irq(vioapic, irq) )
>>>>       deliver_bitmask = (uint32_t)1;
>>>> #endif
>>> Yes, please - Solaris 10 PV drivers are buggy in that they use the
>>> current VCPUs vcpu_info. I just found this bug, and it's getting fixed,
>>> but if this makes sense anyway, it'd be good.
>> I can submit a patch for this, but we feel this is something of a hack.  
> 
> Yep.

OK, I'll throw a patch together.

>> We'd like to provide a more general mechanism for allowing event channel 
>> binding to "work" for HVM guests.  But to do this, we are trying to address 
>> conflicting goals.  Either we honor the event channel binding by 
>> circumventing the IOAPIC emulation, or we faithfully emulate the IOAPIC and 
>> circumvent the event channel binding.
> 
> Well, this doesn't really make sense anyway as is: the IRQ binding has little
> to do with where the evtchns are handled (I don't think there's any
> requirement that they both happen on the same CPU).

Yes, there is no requirement, but there is a significant latency penalty for redirecting an event channel interrupt through an IRQ routed to a different VCPU.  Think 10s of milliseconds delay minimum due to Xen scheduling on a busy node (the current VCPU will not yield unless it is idle).  Add to this the fact that almost any significant I/O load on an HVM Windows guest becomes cpu bound quickly (so your scheduling priority is reduced).

>> Our driver writers would like to see support for multiple callback IRQs.  
>> Then particular event channel interrupts could be bound to particular IRQs. 
>> This would allow PV device interrupts to be distributed intelligently.  It 
>> would also allow net and block interrupts to be disentangled for Windows PV 
>> drivers.
> 
> You could do a bunch of that just by distributing them from the single
> callback IRQ. But I suppose it would be nice to move to a
> one-IRQ-per-evtchn model. You'd need to keep the ABI of course, so you'd
> need a feature flag or something.

Distributing from a single IRQ works OK for Linux, but doesn't work very well for older versions of Windows.  For block handling you want to deliver the real interrupts in SCSI miniport context.  The network can deal with the interrupt redirect.  But the network easily generates the highest interrupt rates and is sensitive to additional latency.  So you end up slowing SCSI down with "extra" network interrupts, and slowing the network down with increased interrupt latency.  Delivering net and block interrupts independently would avoid these issues.  Delivering interrupts to a bus driver and forwarding these to virtual device drivers directly is only an option on newer versions of Windows.

>> We deal pretty much exclusively with HVM guests, do SMP PV environments 
>> selectively bind device interrupts to different VCPUs?
> 
> For true PV you can bind evtchns at will.
> 
> regards
> john

  reply	other threads:[~2008-09-05 18:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-05  1:06 Interrupt to CPU routing in HVM domains - again James Harper
2008-09-05  1:21 ` John Levon
2008-09-05  7:44   ` Keir Fraser
2008-09-05 10:25     ` James Harper
2008-09-05 13:18       ` John Levon
2008-09-05  7:43 ` Keir Fraser
2008-09-05 10:13   ` James Harper
2008-09-05 10:32     ` Keir Fraser
2008-09-05 15:15 ` Steve Ofsthun
2008-09-05 15:25   ` John Levon
2008-09-05 17:11     ` Steve Ofsthun
2008-09-05 17:28       ` John Levon
2008-09-05 18:47         ` Steve Ofsthun [this message]
2008-09-06  7:48         ` Keir Fraser
2008-09-06  7:59           ` Keir Fraser
2008-09-06 12:21           ` James Harper
2008-09-08 16:51             ` bart brooks
2008-09-09  0:41               ` James Harper

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=48C17ED5.8000800@virtualiron.com \
    --to=sofsthun@virtualiron.com \
    --cc=bart_brooks@hotmail.com \
    --cc=james.harper@bendigoit.com.au \
    --cc=keir.fraser@eu.citrix.com \
    --cc=levon@movementarian.org \
    --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 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.