I have a very strange problem that I cannot seem to get a handle on. It
appears that under certain conditions my interrupt routine is not being
called.
I have written a serial port driver (loadable module) to interface with
our equipment. Standard 16550 kind of code. This code works OK for
long, long periods of time until...
With an HP logic analyzer, I can see that the UART is generating
interrupts to the 8259 chip. I can see that the 8259 chip is generating
interrupts to the CPU. However, for whatever reason, I can also see
that our interrupt code is NOT being called for an extended period of
time, on the order of 4-5 milliseconds (yes, that's right,
milliseconds). Next thing I know, I've got a receiver overrun error.
I know for a fact I'm not getting into the ISR, I've used some spare
bits in a parallel port to show me when I enter/leave. I do know for a
fact that during this 4-5 millisec window somebody else is generating
interrupts to the CPU, just not quite sure who yet. My guess is that a
higher priority ISR is "taking over" and not relinquishing control.
This kernel (Redhat 6.2) has network support enabled, but is not
actually hooked up to a network of any kind. The only things connected
are our equipment, a keyboard, and a monitor, text mode, no mouse or
graphics.
So... I just picked up a book on the Linux kernel and am about to start
delving into the particulars of interrupt handling. Before I make the
leap, does anybody out there have any insight? Where to look, docs
to read, helpful books, etc., etc.
TIA,
Mike Lackey
Sr. Software Engineer
PESA Switching Systems
330-A Wynn Dr.
Huntsville, AL 35805
256.726.9200
"Mike Lackey" <nos...@nospam.com> wrote in message
news:3AD4817D...@nospam.com...
Pat Crean wrote:
> man hdparm
>
Mike,
you're probably hitting a real-time problem here. There are drivers in the
kernel which disable interrupts for random amounts of time. I've seen up
to 200 ms in normal operation and up to a couple of seconds when loading
driver modules. Linux is not supposed to be a RTOS - a desktop user won't
notice a 'freeze' of 200 ms.
I think there is a program around which allows you to re-prioritise the
interrupt lines. It's called irqtune or similar. This might help, but
won't guarantee response times.
If you absolutely can't afford missing interrupts, you'll have to install
RT-Linux. See http://luz.cs.nmt.edu/ for tons of information. :^)
Kind regards,
Iwo