linux >> execution time in interrupt handler.

by anand_gore » Wed, 30 Jul 2003 07:55:43 GMT

Hi all,

May be this is just a stupid question, but I have to ask it. :)

Is there any limitation on execution time in the interrupt handler?
e.g.
In a timer interrupt, I perform some of the tasks like -
1. refreshing the watchdog timer.
2. set user clock
3. calculate process CPU usage

Is is that there is a limit on the tasks performed in the interrupt handler?


Your response highly appreciated.

Thank you.
-Anand


linux >> execution time in interrupt handler.

by Bit Twister » Wed, 30 Jul 2003 08:11:10 GMT





Yes. You strive to process all interrupts before they arrive again.


Hmmm, question is kinda like, How long is a piece of string?

Very low interrupt volumn, system has more time to waste in the
interrupt handler. High interrupt rate, less time to prevent interrupt loss.

I remember a conversation where the coder says,
Geese, if management finds how much data we throw out as the target
gets closer, they would have a cat.

Program was for target tracking in an aircraft fire control system.



linux >> execution time in interrupt handler.

by Bob McConnell » Thu, 31 Jul 2003 08:28:21 GMT

On Wed, 30 Jul 2003 00:11:10 GMT, Bit Twister




Looking at the bigger picture, if all hardware interrupts fire at the
same time, you have to process all of them before any one fires again,
or at least processs and reset the ones that will fire again the
quickest before they fire again.

Consider the basics: Clock every x ms (55 on the PC). Uart recieve
every (bit time * bits/byte) / FIFO length, but you have to empty the
FIFO. (Transmit buffer empty is not as important, since a gap in
outgoing bytes is not fatal.) NIC once every incoming packet, or at
least on the first packet arrival. (Depends on the hardware here, but
again you need to clean the buffer.) Add any others here.

Most of them are unpredictable, except maybe the minimum time between
each possible interrupt. But that's what makes ISR and driver coding
so much fun.

Bob McConnell
N2SPP



Similar Threads

1. de2104x: interrupts before interrupt handler is registered - Linux

2. [PATCH] USB: fix interrupt disabling for HCDs with shared interrupt handlers

3. [PATCH] USB: fix interrupt disabling for HCDs with shared interrupt handlers - Linux

4. file associations/url protocol handler/shell execution on linux

Is there a industry standard/typical/pretty much expected, in linux
(well in linux you can remove everything) and less importantly unix,

a file handler, 

or something of a central system of file associations where the user
can select which program to use with a file/url/data/resource/whatever
and all programs use it when they need to open other files,

or a shell execution, like putting a http: or rtsp: or irc: url into
the command line shell and the shell opens it with the right browser,
or shell execution of non-executable files

or a default handler for files/urls system

or something that has the functional equivelent of windows's
HKEY_CLASSES_ROOT hive?

I am trying to open a media file with the correct media player in the
source of a program written in Perl, and I dont want to have to have
the user define the player in the config of the program.

5. semaphores not usable in Linux interrupt handler?

6. Resetting system clock with interrupt handler?

I have project using a GPS device in what we call a "player unit".  The
player unit is a small AMD Geode (x86) based device running Linux.  The
GPS is a PCI part connected to INTD (PCI INTx).  It submits interrupts
every second which need to be caught and used to reset the system time
with - thereby synchronizing the entire (wireless) network of player
units.

1) How do associate a handler with this interrupt?

2) What is the best system call to reset the the system clock?  (I
assume I really don't want to reset the hardware clock?)

---John

7. [Q] vmalloc and interrupt handler

8. Adding a new interrupt handler to the IDT

I have a system which will be creating CPU interrupts via a 
user-supplied IDT value.  I have a kernel module which will handle the 
interrupt - I just need to hook this code into the interrupt handler 
mechanism.  I cannot find any documentation on how to create an entry in 
the IDT or to identify the linkage protocol (assuming I can create an 
IDT entry).

Note: These are NOT IRQs and, therefore, the request_irq() services 
cannot be used.  This would be equivalent to creating a handler for the 
INT instruction.

Any ideas or pointers would be appreciated.

Thanks - Martin