User: Password:
|
|
Subscribe / Log in / New account

Moving interrupts to threads

Moving interrupts to threads

Posted Oct 10, 2008 14:53 UTC (Fri) by jake (editor, #205)
In reply to: Moving interrupts to threads by magnus
Parent article: Moving interrupts to threads

> I don't quite understand, exactly how does threaded interrupt handlers
> reduce the time needed to be spent with interrupts disabled? Couldn't a
> traditional interrupt handler also immediately just ack the interrupt and
> re-enable interrupts?

Sorry I wasn't more clear in the article. Without threaded interrupts, there is no mechanism for the rest of the work to get done without being explicitly arranged for by the top half (i.e. tasklets or workqueues). This necessitates locking and synchronization between the two pieces. Workqueues have a fair amount of overhead and tasklets must still run atomically (i.e. no sleeping, etc.) as well.

Threaded interrupts provide the mechanism for additional work to be done outside of the top half, more or less automatically.

Hopefully I didn't botch this explanation as well :)

jake


(Log in to post comments)

Moving interrupts to threads

Posted Oct 16, 2008 14:42 UTC (Thu) by neli (subscriber, #51380) [Link]

Don't these threaded interrupt handlers have even more overhead than workqueues? Workqueues are at least handled sequentially in the same thread; using threaded interrupt handlers means there are even more context switches.

Why threaded interrupt handlers are important

Posted Apr 10, 2011 15:01 UTC (Sun) by abacus (guest, #49001) [Link]

Don't these threaded interrupt handlers have even more overhead than workqueues? Workqueues are at least handled sequentially in the same thread; using threaded interrupt handlers means there are even more context switches.

I'm afraid that you have missed a key point about real-time systems. Design of a hard real-time system starts with deciding which threads in the system will run at real-time priority (SCHED_FIFO or SCHED_RR) and also at which priority (1..99). This step involves all threads in the system, including threaded interrupt handlers. By assigning a higher priority to certain application threads than the threaded interrupt handlers it becomes possible to obtain a system with low and bounded event response time. Handling some of the interrupt work via workqueues instead of threaded interrupt handlers would result in a larger event response time.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds