The material found here has been derived from a similar directory that was once 
distributed with NMT-RTLinux.

This directory contains a test module to make a fine tuning of the oneshot
real-time scheduler. The idea is to measure the difference in time between
the expected switch time and the time when a task is actually called by the
scheduler.

Note that under the appropriate arch directory you'll find an equivalent module
that gives you directly the macro to insert in rtai.h.

To run it do:
make clean
make
./run, and follow what it says you.

Check will print a sequence of 3 "miss" numbers (nanosecs) - min, max, average.
Use these numbers to change the LATENCY value in "rtai.h" in directory 
"include" or to set the it at rtai_sched installation by typing
"insmod modules/rtai_sched Latency=<x>", where <x> is derived from running 
"check" and should make the average value printed by it approximately zero.
In practice that means you should set LATENCY to the average value printed by
"check" if this is greater than 500. Tuning beyond such a precision is
illusory.

It must be noted that the results obtained depend on the computer load and
on the number of real time tasks you are running. In the past we used a
selfcalibration feature but that revealed itself unreliable on the most 
performing machines so we gave it up.
