[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interrupt latency question



An interrupt is taken following the currently executing instruction,
provided that the interrupts are not disabled, and the interrupt handler
itself is quite "thin".

So the theoretical latency is in the nanoseconds, but in practice, atomic
operations within the kernel and in drivers require the disabling of
interrupts from time to time. You have to measure this if you need a
value. Most of the time, it's in the 1-5 instruction ballpark, but I can
imagine that there are drivers that might keep IRQ's disabled for
longer. It's usually possible to fix those though..

(in other words, the problem is not the interrupt latency itself but
guaranteeing a latency at all times)

> > Also, does elinux allow anything like the rtlinux execution model
> where > time critical code runs at a high priority and the linux
> kernel runs as a > lower priority thread.

Usually you can simulate this using appropriate interrupt handlers, kernel
threads or bottom half handlers. It depends heavily on what you need to
do..

I haven't looked into rtlinux but I suspect it is quite platform dependent
and would require some work to use on our chip. This is just a guess
though..

/BW