strange scheduling latency results

Sebastian Kuzminsky <[email protected]> Tue, 11 Apr 2017 16:30:06 -0600
Newsgroups gmane.linux.real-time.rtai
Message-ID <[email protected]>
Hi there, a LinuxCNC user reports strange thread scheduling results on 
an AMD A6-6400K.  This is with RTAI 3.9 and Linux 3.4.55, compiled for 
i686 (32-bit x86 mode).  Other hardware runs this exact software without 
the strange behavior described below.

There are two realtime threads in this system, which we call the "base 
thread" and the "servo thread".  The base thread runs with a 25 
microsecond period, the servo thread with a 1 millisecond period.

We have a test program called "latency-histogram" that runs the threads 
and monitors scheduling latency, and presents the results as a graphical 
histogram.  Here's a graph from this A6-6400K machine:

https://imagebin.ca/v/3IkSuxnTVoWH

Notice that the base thread (on the left) runs about when it's 
scheduled, with a bell-shaped curve of jitter around the "0 microseconds 
of latency" point.

But the servo thread histogram (on the right) looks different.  It too 
has a bell curve of scheduling jitter, but it's not centered on 0.  It 
looks like the servo thread consistently starts a handful of 
microseconds before it's supposed to.

Any suggestions for us to debug or deal with this issue?


-- 
Sebastian Kuzminsky
_______________________________________________
Rtai mailing list
[email protected]
https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai