Thread (5 messages) 5 messages, 4 authors, 2012-03-10

timer signal loss on RT

From: Mark Hounschell <hidden>
Date: 2012-03-10 10:26:27

I'm trying to run one of our applications while using the RT kernel. I am 
having a problem receiving timer signals in a RT thread pinned to a 
processor. The thread is a spinning cpu hog. I am not able to provide 
source for this application but have written a simple test case that 
_seems_ to fail the same way.  This works fine on a non-RT kernel. I have 
attached the test case. It basically sets up a 60Hz repeating timer, runs 
for 10 seconds, then displays how many signals the RT thread caught. Should 
be around 600. And it is on a vanilla kernel but not on an RT kernel. It 
does require an SMP box to run. It will NOT lockup your machine if you run 
it. Worse case would be for 10 seconds. The 2 RT priorities in use are less 
than 50 BTW.

I'm sure you can find many things wrong with this test case but I'm not 
sending it for discussion on the merits, or certainly the lack of, an 
application that contains a cpu hog, but only to show what I think is a 
problem with RT kernels.

compile with "cc rtc.c -o rtc -lrt -lpthread"

run it and in 10 seconds it should stop and indicate 600 timers signals 
were caught by the RT thread. On RT, I usually get 0 but often I get some, 
just not 600.

Thanks in advance
Mark

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help