public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Pollard <jesse@cats-chateau.net>
To: "Michael Frank" <mhf@linuxmail.org>,
	"Matt Mackall" <mpm@selenic.com>,
	"Grover, Andrew" <andrew.grover@intel.com>
Cc: "Helge Hafting" <helgehaf@aitel.hist.no>, linux-kernel@vger.kernel.org
Subject: Re: Why no interrupt priorities?
Date: Tue, 2 Mar 2004 09:25:38 -0600	[thread overview]
Message-ID: <04030209253800.18618@tabby> (raw)
In-Reply-To: <opr361tas74evsfm@smtp.pacific.net.th>

On Monday 01 March 2004 11:35, Michael Frank wrote:
> On Mon, 1 Mar 2004 10:57:42 -0600, Jesse Pollard <jesse@cats-chateau.net> 
wrote:
> > On Sunday 29 February 2004 03:43, Michael Frank wrote:
> >> On Fri, 27 Feb 2004 14:53:45 -0600, Jesse Pollard
> >> <jesse@cats-chateau.net>
> >
> > wrote:
[snip]
> >> >
> >> > You should... after all that first entry in the chain has the highest
> >> > priority
> >>
> >> Please also consider that physcial IRQ's are in practice assigned "semi
> >> randomly".
> >
> > I think that would be up to the installer.
>
> How?

Usually (at least in my boxes, anyway) the IRQ tends to be associated with the
PCI slot number. suitable ordering of the interfaces in the slots was what I 
was thinking of. But then, I don't overload the IRQs either.

>
> >> In a way IRQ priorities in general purpose computing applications are
> >> irrelevant :)
> >
> > I would say that they have a priority, just that the priority isn't being
> > used.
>
> Not usable in 2 dimensions - A) the IRQ can't be controlled, B) the
> location in the chain can't be contrlolled.

The location in the chain should be controled - even if it is nothing
other than a driver based priority number used to insert in the chain
at the appropriate location.

> >> Lets say you have a bunch of devices demand service, all have to be
> >> serviced but is either not significant which gets done first or the
> >> practival IRQ priorities are "less than optimal":
> >>
> >> Keyboard	IRQ1		Well buffered
> >>
> >> NIC1		IRQ10		Buffered
> >> NIC2		IRQ10		Buffered
> >> USB		IRQ11		Buffered
>
>     MOUSE          IRQ12       ?
>
> >> serial port	IRQ3		Small FIFO (assuming '550)
> >> serial port	IRQ4			"-"
> >>
> >> Here, serial ports would would be most critical, however the priorities
> >> of IRQ3 and IRQ4 are below priorities of IRQ10 and IRQ11...
> >
> > I don't think these are all using "shared IRQ...". I was my understanding
> > that each IRQ had its own chain. And the priority of the drivers in that
> > chain is determined by the order.
>
> The NICs's are both shared on IRQ10.
>
[snip]
> >
> > If they did share an interrupt, you make the PPP serial line higher
> > priority than the mouse... Yet you still don't want to loose mouse
> > syncronization - so check it anyway. Handling it is still faster than an
> > additional interrupt, and with less overhead.
>
> Right, the mouse is important too. A major practical system level issue
> is shown in above example:  The PPP serial line could be easily starved by
> those 2 NIC's+USB+Mouse with higher priority.
>
> Baudrate 115,200 / 11bit is about 10000 chars/s peak. Given a FIFO size
> of 16 + 1 RxHR (best case), after 1ms-1.5ms characters get lost.
>
> A fix would require reprogram PIC IRQ priorities here to make IRQ3 and IRQ4
> higher priority than what comes in from the cascaded controller (via IRQ2).
>
> Obviously more APIC's abound but there still is need for a facility to
> manage priorities, and this (primary priority) is more significant than
> what happens within a chain.

Yes.

>
> > Granted, this is more important on slower hardware or basic interactive
> > service, but it all contributes to overhead. Properly organized (and
> > used) chains will reduce the overhead.
>
> More control over physical IRQ priority would be an initial step helping
> with non-shared legacy hardware and device with small buffers.
>
> More modern hardware like USB is using large buffers, DMA and is less
> critical.
>
> And perhaps a config-bit per chain to tell it whether to rescan from
> scratch would be useful to address the concerns mentioned, _and_ then there
> should be a facility to link a interrupt into a specific location in a
> chain.

A round-robin IRQ scheduler would also help those at the same priority. Again,
software implementation sucks (I used to do embeded systems).

It really looks like the old arch is being pushed way beyond what is 
reasonable. It is really time for vectored interrupts to resurface (re: the 
old PDP 11 style, allowing each interrupt to have it's own software priority,
AND interrupt routine... which also happens to be where "spl" started from :-)

It really looks like the PCI can't handle more than about 3 interrupt sources
at a time, in spite of the APIC/cascade faking it to look like more.

The busyist box I have (a server) has two SCSI controllers and two IDE (one 
IRQ each, and the IDE is used only for primary boot, and backup), and an 
ethernet. The PS2 mouse and keyboard don't get used (much). The second 
busyist has three ethernet connections (1 from DSL, 1 from wireless, 1 from
the internal net - it is a firewall) and an IDE boot. Again, the
keyboard/mouse are not used.

  reply	other threads:[~2004-03-02 15:28 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
  -- 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

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=04030209253800.18618@tabby \
    --to=jesse@cats-chateau.net \
    --cc=andrew.grover@intel.com \
    --cc=helgehaf@aitel.hist.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhf@linuxmail.org \
    --cc=mpm@selenic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox