RTEMS Interrupt Latency and Semaphore Release Obtain Latency

Jamie Bowman jamie.bowman at steepestascent.com
Thu Sep 17 12:23:01 UTC 2009


All

 

I wonder if I could tap in to the groups experience with writing ISRs within
a typical RTEMS driver model.

 

We have written a number of drivers for various low level UART styled
devices. These devices can work in either polled or interrupt mode. In
interrupt mode we use the SIMPLE BINARY SEMAPHORE to synchronise events
between our ISRs and the Read and Write routines of driver e.g. within the
ISR we use rtems_semaphore_release and within the read and write routines
block until rtems_semaphore_obtain is successful. 

 

What we have observed so far is that the ISR takes a relatively long time to
be serviced, 10us [200 clock cycles] up to 40us [800 clock cycles], and that
the time between releasing the semaphore within the ISR and the Read or
Write Routines being released varies considerably, 20us [400 clock cycles]
up to 80us [1600 clock cycles]. We also have noted that the time between
releasing the semaphore within the ISR and the Read or Write Routines being
released on the first time of execution always appears to be significantly
longer than subsequent times. 

 

Our devices are attached directly to the interrupt lines on a SPARC Leon 2
processor. The processor runs at 20 MHz and we are using rtems 4.8.

 

My first question would be are these delays typical of an RTEMS based
system?

Secondly is there a way of improving the performance by reducing these
latencies in some way? 

Lastly is the SIMPLE BINARY SEMAPHORE the correct synchronisation mechanism
to use in this instance?

 

Thank you for in advance for your assistance.

 

            Jamie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20090917/7e9e3a39/attachment.html>


More information about the users mailing list