public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RE: Why no interrupt priorities?
@ 2004-02-27 17:44 Grover, Andrew
  2004-02-27 18:15 ` Chris Friesen
  2004-02-27 18:55 ` Matt Mackall
  0 siblings, 2 replies; 44+ messages in thread
From: Grover, Andrew @ 2004-02-27 17:44 UTC (permalink / raw)
  To: Helge Hafting; +Cc: linux-kernel

> From: Helge Hafting [mailto:helgehaf@aitel.hist.no] 
> Grover, Andrew wrote:
> > Is the assumption that hardirq handlers are superfast also 
> the reason
> > why Linux calls all handlers on a shared interrupt, even if 
> the first
> > handler reports it was for its device?
> > 
> No, it is the other way around.  hardirq handlers have to be superfast
> because linux usually _have to_ call all the handlers of a shared irq.
> 
> The fact that one device did indeed have an interrupt for us 
> doesn't mean
> that the others didn't.  So all of them have to be checked to be safe.

If a device later in the handler chain is also interrupting, then the
interrupt will immediately trigger again. The irq line will remain
asserted until nobody is asserting it.

If the LAST guy in the chain is the one with the interrupt, then you
basically get today's ISR "call each handler" behavior, but it should be
possible to in some cases to get less time spent in do_IRQ.

It is a trivial change to implement this behavior, but benchmarking
would have to be done to verify it really would be a worthwhile
optimization.

Regards -- Andy

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: Why no interrupt priorities?
@ 2004-02-27 11:37 Etienne Lorrain
  2004-02-27 13:24 ` Michael Frank
  0 siblings, 1 reply; 44+ messages in thread
From: Etienne Lorrain @ 2004-02-27 11:37 UTC (permalink / raw)
  To: linux-kernel

Russell King wrote:
> Michael Frank wrote:
> > Is this to imply that edge triggered shared interrupts
> > are used anywhere?
>
> It is (or used to be) rather common with serial ports.  Remember that
> COM1 and COM3 were both defined to use IRQ4 and COM2 and COM4 to use
> IRQ3.

  If you are talking of old ISA serial cards, the IRQ were "shared" in
 the sense that the IRQ pin was not connected to the microprocessor
 when the device was not open (under Linux).
 So you could reliably have COM1 and COM3 on IRQ4 if you did not use
 the two devices at the same time - or use one of them in the polling
 mode (IRQ 0: handle by the timer at low speed).

  Some unusual hardware could handle two ports on the same IRQ (the
 same card mixing itself the IRQ of the two COM port present on the
 same ISA card) but the mixing could not be reliably handled at the
 ISA level. Using a resistor and/or a diode instead of a jumper to
 select the IRQ could also do the trick. So the software was ready
 to handle two interrupts from two UART on the same IRQ - but you
 had to have special hardware.

  Some people had success having a modem on COM1 and a serial _mouse_
 on COM3 (or the other way around) because the COM1/modem was winning
 the control of the ISA IRQ  and the COM3/modem was loosing but because
 of 1200 bauds transmission speed the timer interrupt was recovering the
 char received. So they could not tell the difference and did not know
 why inverting the two serial plug did not work.

  Now if you are talking of newer motherboard with COM port integrated,
 you may have been able to share (but unusual) - if you are talking
 of PCI card serial ports then that is another story.

  Etienne.


	

	
		
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! 
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com

^ permalink raw reply	[flat|nested] 44+ messages in thread
[parent not found: <mailman.1077822002.21081.linux-kernel2news@redhat.com>]
* RE: Why no interrupt priorities?
@ 2004-02-27  1:36 Grover, Andrew
  2004-02-27  3:02 ` Randy.Dunlap
                   ` (3 more replies)
  0 siblings, 4 replies; 44+ messages in thread
From: Grover, Andrew @ 2004-02-27  1:36 UTC (permalink / raw)
  To: Mark Gross, arjanv, Tim Bird; +Cc: root, linux kernel

> On Thursday 26 February 2004 13:30, Arjan van de Ven wrote:
> > hardware IRQ priorities are useless for the linux model. In 
> linux, the
> > hardirq runs *very* briefly and then lets the softirq context do the
> > longer taking work. hardware irq priorities then don't matter really
> > because the hardirq's are hardly ever interrupted really, 
> and when they
> > are they cause a performance *loss* due to cache trashing. 
> The latency
> > added by waiting briefly is going to be really really short 
> for any sane
> > hardware.

Is the assumption that hardirq handlers are superfast also the reason
why Linux calls all handlers on a shared interrupt, even if the first
handler reports it was for its device?

-- Andy

^ permalink raw reply	[flat|nested] 44+ messages in thread
* Re: Why no interrupt priorities?
@ 2004-02-26 23:47 Albert Cahalan
  0 siblings, 0 replies; 44+ messages in thread
From: Albert Cahalan @ 2004-02-26 23:47 UTC (permalink / raw)
  To: linux-kernel mailing list; +Cc: tim.bird, mgross

Tim Bird writes:

> What's the rationale for not supporting interrupt priorities
> in the kernel?
>
> We're having a discussion of this in one of our CELF working
> groups, and it would help if someone could explain why an
> interrupt priority system has never been adopted in the
> mainstream Linux kernel. (I know that some implementations
> have been written and proposed).
>
> Is there a strong policy against such a thing, or is it just
> that the right implementation has not come along?

Simple reason: shared interrupts

Besides that, what you'd really want is a mask, not
a level. You might like to block out all network
interrupts while still allowing SCSI interrupts.
At some other time, you'd like the opposite.
None of the common hardware (PC, Mac, etc.) is at
all friendly to using a mask, even if you don't
have shared interrupts.

So the policy is: get in, shut the hardware up,
set a flag or wake something up, and get out.
Interrupt handlers are supposed to be very fast
and simple. Put the real work elsewhere.




^ permalink raw reply	[flat|nested] 44+ messages in thread
* Why no interrupt priorities?
@ 2004-02-26 19:05 Tim Bird
  2004-02-26 19:39 ` Richard B. Johnson
  2004-02-27 12:04 ` Christoph Hellwig
  0 siblings, 2 replies; 44+ messages in thread
From: Tim Bird @ 2004-02-26 19:05 UTC (permalink / raw)
  To: linux kernel

What's the rationale for not supporting interrupt priorities
in the kernel?

We're having a discussion of this in one of our CELF working
groups, and it would help if someone could explain why an
interrupt priority system has never been adopted in the
mainstream Linux kernel. (I know that some implementations
have been written and proposed).

Is there a strong policy against such a thing, or is it just
that the right implementation has not come along?

Thanks,

=============================
Tim Bird
Architecture Group Co-Chair
CE Linux Forum
Senior Staff Engineer
Sony Electronics
E-mail: Tim.Bird@am.sony.com
=============================


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

end of thread, other threads:[~2004-03-02 15:28 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-27 17:44 Why no interrupt priorities? Grover, Andrew
2004-02-27 18:15 ` Chris Friesen
2004-02-27 18:42   ` Richard B. Johnson
2004-02-27 19:42     ` Michael Frank
2004-02-27 19:11   ` Michael Frank
2004-02-27 18:55 ` Matt Mackall
2004-02-27 19:09   ` Tim Hockin
2004-02-27 20:29     ` Matt Mackall
2004-02-27 19:19   ` Michael Frank
2004-02-27 20:53     ` Jesse Pollard
2004-02-29  9:43       ` Michael Frank
2004-03-01 16:57         ` Jesse Pollard
2004-03-01 17:35           ` Michael Frank
2004-03-02 15:25             ` Jesse Pollard
  -- strict thread matches above, loose matches on Subject: below --
2004-02-27 11:37 Etienne Lorrain
2004-02-27 13:24 ` Michael Frank
     [not found] <mailman.1077822002.21081.linux-kernel2news@redhat.com>
2004-02-27  8:00 ` Pete Zaitcev
2004-02-27  1:36 Grover, Andrew
2004-02-27  3:02 ` Randy.Dunlap
2004-02-29  8:32   ` Michael Frank
2004-02-29  8:36     ` Arjan van de Ven
2004-02-29  9:52       ` Michael Frank
2004-02-27  5:32 ` Benjamin Herrenschmidt
2004-02-27  6:26   ` Michael Frank
2004-02-27  6:46     ` Benjamin Herrenschmidt
2004-02-27  9:05     ` Russell King
2004-02-27 13:31       ` Michael Frank
2004-02-27 13:45         ` Richard B. Johnson
2004-02-27 13:50         ` Russell King
2004-02-27 14:51           ` Michael Frank
2004-02-27  7:25 ` Arjan van de Ven
2004-02-27 10:15 ` Helge Hafting
2004-02-27 18:32   ` Mike Fedyk
2004-02-26 23:47 Albert Cahalan
2004-02-26 19:05 Tim Bird
2004-02-26 19:39 ` Richard B. Johnson
2004-02-26 21:02   ` Tim Bird
2004-02-26 21:30     ` Arjan van de Ven
2004-02-26 22:21       ` Mark Gross
2004-02-27  7:14         ` Arjan van de Ven
2004-02-27 11:27           ` Ingo Oeser
2004-02-27 11:52             ` Arjan van de Ven
2004-02-27 13:23     ` Richard B. Johnson
2004-02-27 12:04 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox