All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Interrupt forwarding
@ 2005-03-12 19:59 Ian Pratt
  2005-03-12 20:07 ` Jon Smirl
  0 siblings, 1 reply; 19+ messages in thread
From: Ian Pratt @ 2005-03-12 19:59 UTC (permalink / raw)
  To: Jon Smirl, Keir Fraser; +Cc: xen-devel, ian.pratt

 

> > We don't go that far. A sensible approach would be to require the
> > driver to be restarted, and to reset the hardware device, before
> > unmasking. Or to rate limit each interrupt line to an
> > administrator-configurable 'reasonable' number of IRQs per second --
> > this might also catch bugs where drivers are not properly acking
> > devices for other reasons.
> 
> In x86 boxes almost everything is shared. Leaving the interrupt masked
> off will probably disable 20% of the hardware in the box.

That's not my experience, certainly on modern server hardware. On
systems with an IOAPIC its rare to see a shared interrupt, and even if
you do you can typically avoid it just by swapping a couple of PCI cards
around.

Ian


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: Interrupt forwarding
@ 2005-03-12 18:11 Ian Pratt
  2005-03-12 18:21 ` Keir Fraser
  0 siblings, 1 reply; 19+ messages in thread
From: Ian Pratt @ 2005-03-12 18:11 UTC (permalink / raw)
  To: Jon Smirl, xen-devel; +Cc: ian.pratt

> The subject of interrupt forwarding just came up on lkml. How is this
> dealt with in Xen? I'm not currently a Xen user so I may be
> misunderstanding how it works. In Xen I believe you can assign a piece
> of hardware for exclusive use from a domain. How does this work for
> shared interrupts, what if the domain receiving the interrupt dies and
> can't acknowledge it?

The paper on IO on the Architecture section of the web site is probably
reference (other than the code). 

Shared interrupts aren't good news for performance, but they work OK.

If a driver domain locks up we can kill and restart it -- for safety we
don't rely on it to ack the interrupt.

Ian
 
> Here's my comment from lkml....
> 
> On Sat, 12 Mar 2005 10:55:21 -0500, Jon Smirl 
> <jonsmirl@gmail.com> wrote:
> > I've tried implementing this before (on UML) and could not 
> get around the
> > interrupt problem. Most interrupts on the x86 architecture 
> are shared.
> > Disabling the IRQ at the PIC blocks all of the shared IRQs. 
> This works
> > (hope your userspace handler is last on the shared handler 
> list) until
> > you have a problem in userspace.
> > 
> > Once you have a problem in userspace there is no way to acknowledge
> > the interrupt anymore. I tried to address that by 
> maintaining a timer
> > and suspending the hardware through the D0 state to reset 
> it. That had
> > some success. Not acknowledging the interrupt results in an 
> interrupt
> > loop and reboot.
> > 
> > The problem can be mitigated by choosing what slot your hardware to
> > put your hardware in. This can reduce the number of shared 
> interrupts.
> > If you can get exclusive use of the interrupt this method will work.
> > 
> > If I were designing a new bus I would make interrupt 
> acknowledge part
> > of PCI config space in order to allow a single piece of code to
> > acknowledge them. Since we can't change the bus the only safe way to
> > do this is to build a hardware specific driver for each device to
> > acknowledge the interrupt.
> > 
> > Bottom line is that I could find no reliable solution for 
> handing interrupts.
> 
> 
> -- 
> Jon Smirl
> jonsmirl@gmail.com
> 
> 
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from 
> real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
> 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 19+ messages in thread
* Interrupt forwarding
@ 2005-03-12 18:02 Jon Smirl
  2005-03-12 18:12 ` Mark Williamson
  0 siblings, 1 reply; 19+ messages in thread
From: Jon Smirl @ 2005-03-12 18:02 UTC (permalink / raw)
  To: xen-devel

The subject of interrupt forwarding just came up on lkml. How is this
dealt with in Xen? I'm not currently a Xen user so I may be
misunderstanding how it works. In Xen I believe you can assign a piece
of hardware for exclusive use from a domain. How does this work for
shared interrupts, what if the domain receiving the interrupt dies and
can't acknowledge it?

Here's my comment from lkml....

On Sat, 12 Mar 2005 10:55:21 -0500, Jon Smirl <jonsmirl@gmail.com> wrote:
> I've tried implementing this before (on UML) and could not get around the
> interrupt problem. Most interrupts on the x86 architecture are shared.
> Disabling the IRQ at the PIC blocks all of the shared IRQs. This works
> (hope your userspace handler is last on the shared handler list) until
> you have a problem in userspace.
> 
> Once you have a problem in userspace there is no way to acknowledge
> the interrupt anymore. I tried to address that by maintaining a timer
> and suspending the hardware through the D0 state to reset it. That had
> some success. Not acknowledging the interrupt results in an interrupt
> loop and reboot.
> 
> The problem can be mitigated by choosing what slot your hardware to
> put your hardware in. This can reduce the number of shared interrupts.
> If you can get exclusive use of the interrupt this method will work.
> 
> If I were designing a new bus I would make interrupt acknowledge part
> of PCI config space in order to allow a single piece of code to
> acknowledge them. Since we can't change the bus the only safe way to
> do this is to build a hardware specific driver for each device to
> acknowledge the interrupt.
> 
> Bottom line is that I could find no reliable solution for handing interrupts.


-- 
Jon Smirl
jonsmirl@gmail.com


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2005-03-14 21:59 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-12 19:59 Interrupt forwarding Ian Pratt
2005-03-12 20:07 ` Jon Smirl
2005-03-13 10:01   ` Keir Fraser
2005-03-13 15:56     ` Jon Smirl
2005-03-13 16:01       ` Keir Fraser
2005-03-13 16:49         ` Jon Smirl
  -- strict thread matches above, loose matches on Subject: below --
2005-03-12 18:11 Ian Pratt
2005-03-12 18:21 ` Keir Fraser
2005-03-12 18:33   ` Jon Smirl
2005-03-12 18:48     ` Keir Fraser
2005-03-12 18:53       ` Jon Smirl
2005-03-12 18:59       ` Jon Smirl
2005-03-12 18:02 Jon Smirl
2005-03-12 18:12 ` Mark Williamson
2005-03-14 15:39   ` Ronald G. Minnich
2005-03-14 15:44     ` Mark Williamson
2005-03-14 16:01       ` Ronald G. Minnich
2005-03-14 16:04         ` Ronald G. Minnich
2005-03-14 21:59       ` Andi Kleen

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.