lkml.org 
[lkml]   [2008]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 2/2] serial/8250.c: Use self-adjusting list for port poll order.
On Sun, Nov 16, 2008 at 10:23:52AM -0500, George Spelvin wrote:
> Re: shared IRQs and PCI bus...
> In desktop hardware, yes. But PC-104 equipment (for the benefit of
> confused bystandaers, that's classic ISA bus in a different form factor)
> is still going strong; I just added an 8-port serial card to a little
> embedded box.
>
> But even PCI reads are slow, and the current code does not optimize the
> case when interrupts are level-sensitive. (The optimization is trivial,
> but detecting whether the interrupt is edge- or level-sensitive looks
> messy.)

> The idea is that, if you have 4 ports sharing an interrupt, and the fourth
> is the one that's busy, you'll check every port twice. If you could check
> the busy port first, you'd only need to to do 5 checks.

Um, but the ISA bus was edge sensitive. So presumably PC-104 would be
as well. So you *have* to scan all of the ports twice, because you
want to keep the race window as narrow as possible. If you don't
service incoming characters for a previously idle port (because of the
thought that you only have to check currently busy ports as an
optimization), you'll never get an interrupt on that IRQ again, and
you'll have to wait for the serial timeout to save you (and in the
meantime, you'll likely be losing characters as the FIFO's overflow).

- Ted


\
 
 \ /
  Last update: 2008-11-16 17:27    [W:0.067 / U:15.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site