Re: RTAI in debian9
Paul Pfeiffer <[email protected]> Thu, 1 Mar 2018 14:09:33 +0100
| Newsgroups | gmane.linux.real-time.rtai |
|---|---|
| Message-ID | <[email protected]> |
Yes, all tests are run as root. On 03/01/2018 12:55 PM, Paolo Mantegazza wrote: > The failing kern latency test does not tell me anything. Are you = > making it all as root? > > Paolo. > > On 03/01/2018 11:23 AM, Paul Pfeiffer wrote: >> Thanks for the explanation. >> >> I cannot run the test from the root directory of the RTAI = >> installation, because the run script has relative references to = >> executables. But I could run the preempt test directly in the preempt = >> directory, because there was already a .runinfo file. The results are = >> attached. >> >> However, starting the Kernel latency test, crashed the machine... = >> maybe this is a hint towards the problem? >> >> I digged a little bit into the source code and found the = >> call_usermodehelper function in base/sched/sched.c in the calibrate = >> function. Am I right that this is a call to the executable defined in = >> /base/arch/x86/calibration/calibrate.c? Then, it seems that the crash = >> happens in the else branch of the main function, where no latencies = >> file is present. Important calls seem to be rt_thread_init, = >> rt_make_hard_real_time and rt_make_soft_real_time. Any idea what = >> could go wrong? >> >> Thank you, Paul >> >> ___ >> >> # Running tests >> >> dynclamp@abbott:~/Documents$ cd /usr/realtime/testsuite/ >> >> ## User test >> >> dynclamp@abbott:/usr/realtime/testsuite$ cd user/latency >> dynclamp@abbott:/usr/realtime/testsuite/user/latency$ sudo ./run >> [sudo] password for dynclamp: >> >> RTAI Testsuite - USER space latency test (output data in nanoseconds) >> >> *** latency verification tool with real time hardened user space = >> processes/threads *** >> ***=A0=A0=A0 period =3D 100000 (ns),=A0 avrgtime =3D 1 (s)=A0=A0=A0 *** >> >> RTAI Testsuite - USER latency (all data in nanoseconds) >> 2018/03/1 10:33:45 >> RTH|=A0=A0=A0 lat min|=A0=A0=A0 ovl min|=A0=A0=A0 lat avg|=A0=A0=A0 lat = max|=A0=A0=A0 ovl max| = >> overruns >> RTD|=A0=A0=A0=A0=A0=A0 -230|=A0=A0=A0=A0=A0=A0 -230|=A0=A0=A0=A0=A0=A0= =A0=A0 19|=A0=A0=A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0=A0=A0=A0 0 >> RTD|=A0=A0=A0=A0=A0=A0 -170|=A0=A0=A0=A0=A0=A0 -263|=A0=A0=A0=A0=A0=A0= =A0=A0 18|=A0=A0=A0=A0=A0=A0 2422| 14333|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >> RTD|=A0=A0=A0=A0=A0=A0 -133|=A0=A0=A0=A0=A0=A0 -263|=A0=A0=A0=A0=A0=A0= =A0=A0 18|=A0=A0=A0=A0=A0=A0 3717| 14333|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >> RTD|=A0=A0=A0=A0=A0=A0 -240|=A0=A0=A0=A0=A0=A0 -263|=A0=A0=A0=A0=A0=A0= =A0=A0 28|=A0=A0=A0=A0=A0=A0 5888| 14333|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >> RTD|=A0=A0=A0=A0=A0=A0 -102|=A0=A0=A0=A0=A0=A0 -263|=A0=A0=A0=A0=A0=A0= =A0=A0 41|=A0=A0=A0=A0=A0=A0 4356| 14333|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >> RTD|=A0=A0=A0=A0=A0=A0 -102|=A0=A0=A0=A0=A0=A0 -263|=A0=A0=A0=A0=A0=A0= =A0=A0 41|=A0=A0=A0=A0=A0=A0 4356| 14333|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >> ^C >> >>> S =3D 98.696, EXECTIME =3D 0.0107068 >> rmmod: ERROR: Module rtai_msg is not currently loaded >> rmmod: ERROR: Module rtai_mbx is not currently loaded >> rmmod: ERROR: Module rtai_sem is not currently loaded >> rmmod: ERROR: Module rtai_sched is not currently loaded >> rmmod: ERROR: Module rtai_hal is not currently loaded >> dynclamp@abbott:/usr/realtime/testsuite/user/latency$ cd ../preempt/ >> dynclamp@abbott:/usr/realtime/testsuite/user/preempt$ sudo ./run >> * >> * >> * Type ^C to stop this application. >> * >> * >> RTAI Testsuite - LXRT preempt (all data in nanoseconds) >> RTH|=A0=A0=A0=A0 lat min|=A0=A0=A0=A0 lat avg|=A0=A0=A0=A0 lat max|=A0= =A0=A0 jit fast|=A0=A0=A0 jit slow >> RTD|=A0=A0=A0=A0=A0=A0=A0 -401|=A0=A0=A0=A0=A0=A0=A0 -127|=A0=A0=A0=A0= =A0=A0=A0 2382|=A0=A0=A0=A0=A0=A0=A0 5393| 1792 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -133|=A0=A0=A0=A0= =A0=A0=A0 2382|=A0=A0=A0=A0=A0=A0=A0 5393| 1792 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -131|=A0=A0=A0=A0= =A0=A0=A0 2382|=A0=A0=A0=A0=A0=A0=A0 5393| 2016 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -129|=A0=A0=A0=A0= =A0=A0=A0 3134|=A0=A0=A0=A0=A0=A0=A0 5393| 3302 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -127|=A0=A0=A0=A0= =A0=A0=A0 3623|=A0=A0=A0=A0=A0=A0=A0 5393| 3302 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -133|=A0=A0=A0=A0= =A0=A0=A0 3623|=A0=A0=A0=A0=A0=A0=A0 5393| 3302 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -132|=A0=A0=A0=A0= =A0=A0=A0 3623|=A0=A0=A0=A0=A0=A0=A0 5393| 3302 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -134|=A0=A0=A0=A0= =A0=A0=A0 3623|=A0=A0=A0=A0=A0=A0=A0 5393| 4961 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -134|=A0=A0=A0=A0= =A0=A0=A0 5743|=A0=A0=A0=A0=A0=A0=A0 5393| 4961 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -132|=A0=A0=A0=A0= =A0=A0=A0 5743|=A0=A0=A0=A0=A0=A0=A0 5393| 4961 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -136|=A0=A0=A0=A0= =A0=A0=A0 5743|=A0=A0=A0=A0=A0=A0=A0 5393| 4961 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -406|=A0=A0=A0=A0=A0=A0=A0 -134|=A0=A0=A0=A0= =A0=A0=A0 5743|=A0=A0=A0=A0=A0=A0=A0 5393| 4961 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -408|=A0=A0=A0=A0=A0=A0=A0 -126|=A0=A0=A0=A0= =A0=A0=A0 5743|=A0=A0=A0=A0=A0=A0=A0 5393| 4961 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -408|=A0=A0=A0=A0=A0=A0=A0 -133|=A0=A0=A0=A0= =A0=A0=A0 5743|=A0=A0=A0=A0=A0=A0=A0 5393| 4961 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -408|=A0=A0=A0=A0=A0=A0=A0 -131|=A0=A0=A0=A0= =A0=A0=A0 6401|=A0=A0=A0=A0=A0=A0=A0 6292| 4961 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -408|=A0=A0=A0=A0=A0=A0=A0 -127|=A0=A0=A0=A0= =A0=A0=A0 6701|=A0=A0=A0=A0=A0=A0=A0 8385| 4961 >> RTD|=A0=A0=A0=A0=A0=A0=A0 -408|=A0=A0=A0=A0=A0=A0=A0 -121|=A0=A0=A0=A0= =A0=A0=A0 6701|=A0=A0=A0=A0=A0=A0=A0 8385| 4961 >> ^CRTD|=A0=A0=A0=A0=A0=A0=A0 -408|=A0=A0=A0=A0=A0=A0=A0 -121|=A0=A0=A0=A0= =A0=A0=A0 6701|=A0=A0=A0=A0=A0=A0=A0 8385| 4961 >> >> ## Kernel tests >> >> cd ../../kern/latency >> >> sudo ./run >> >> CRASH >> >> >> On 02/28/2018 09:46 PM, Paolo Mantegazza wrote: >>> The third number is the assumed default period used for the = >>> calibration, if it succeeded and you did not set it to a different = >>> one when configuring RTAI. >>> Clearly, when set by hands, it has little meaning, albeit being = >>> needed when rtai_sched is insmoded. >>> >>> It is strange that, once you ran latency, the preempt test do not = >>> run. Recall that you are assumed to run those tests from the RTAI = >>> install dir. Be sure of doing it in such a way and let me know. >>> >>> Now that you ran rtai_sched using the latencies file, the = >>> call_userhelper support seems to be working also on your system. So = >>> I've even less clues than before on the why it did not calibrate. In = >>> fact the automatic calibration is nothing but the latency test in = >>> disguise, coupled to a trivial Kalman filter to estimate the = >>> expected latency on the fly. >>> >>> Thanks for your feedback, Paolo. >>> >>> _______________________________________ >>> From: Paul Pfeiffer [[email protected]] >>> Sent: Wednesday, February 28, 2018 7:14 PM >>> To: Paolo Mantegazza; [email protected] >>> Subject: Re: [Rtai] RTAI in debian9 >>> >>> Thanks for the feedback. >>> >>> I added the latencies file and now the rtai_sched module can be loaded >>> without specifiying user or kernel latency. In the kernel output, I see >>> that the kernel latency is now 440ns and the user latency 880ns. = >>> What is >>> the meaning of the third number? >>> >>> I tried running the other tests, but they do not work, because of a >>> missing .runinfo file. Do I have to create this? What should be in this >>> file? >>> >>> We will use the RTAI patched kernel to perform recordings from neurons >>> with real time feedback loops. I will update you, when we have tried = >>> the >>> new RTAI patch within this application. >>> >>> Best, Paul >>> >>> >>> On 02/27/2018 10:59 PM, Paolo Mantegazza wrote: >>>> Your system seems OK. If you edit a file, named "latencies", with a = >>>> single line containing: >>>> 440 880 10000 >>>> and copy it into "rtai_installdir/calibration/latencies. >>>> you'll have what the calibration should have done and there will be = >>>> non need to set those latencies at rtai_sched.ko insmod. >>>> In any case, once you have done what above, may test both latency = >>>> and preempt, in user, kern and kthread directories of yout = >>>> rtai_installdir and then report what happened? >>>> Do not test switches, It locks the cpu for a bit of time and may be = >>>> risky. I'll not be surprised of a muted system. >>>> As for why it does not work on your system, without a diagnose = >>>> hands on, I've no clue. >>>> Moreover I'll be glad to hear of some further checks with a = >>>> production code of yours, if any. >>>> >>>> Thanks, Paolo >>>> >>>> ________________________________________the >>>> From: Rtai [[email protected]] on behalf of Paul Pfeiffer = >>>> [[email protected]] >>>> Sent: Tuesday, February 27, 2018 4:41 PM >>>> To: [email protected] >>>> Subject: Re: [Rtai] RTAI in debian9 >>>> >>>> Hi, >>>> >>>> thanks for the nice discussion in this thread. I have a similar = >>>> issue to >>>> the one described by josu, but on a real machine. >>>> >>>> Setup: Linux kernel 4.9.76 and RTAI 5.1 >>>> >>>> For patching the kernel and compilation of the kernel modules, I >>>> followed the instructions from Jan Benda, here >>>> http://relacs.sourceforge.net/plugins/rtaicomedi/ >>>> >>>> Insertion of the rtai_hal module works, but insertion of rtai_sched >>>> kills the system. >>>> >>>> Like Paolo suggested, I also tried loading the rtai_sched with >>>> kernel_latency and user_latency set to 1000. This works. Does this = >>>> mean >>>> that the calibration is the problem? How could I solve this for my = >>>> setup? >>>> >>>> Also, I ran the suggested modified latency test. However, like josu, I >>>> had to change the insertion of the rtai_sched module to >>>> >>>> ``` >>>> >>>> insmod $MODULES/rtai_sched.ko kernel_latency=3D1 user_latency=3D1 >>>> >>>> ``` >>>> >>>> otherwise the system would stop responding. >>>> >>>> Please find below the output of the test and the corresponding kernel >>>> messages. >>>> >>>> Thank you, Paul >>>> >>>> ________________ >>>> >>>> $ sudo ./testsuite/user/latency/run >>>> >>>> RTAI Testsuite - USER space latency test (output data in nanoseconds) >>>> >>>> *** latency verification tool with real time hardened user space >>>> processes/threads *** >>>> ***=A0=A0=A0 period =3D 100000 (ns),=A0 avrgtime =3D 1 (s)=A0=A0=A0 *** >>>> >>>> RTAI Testsuite - USER latency (all data in nanoseconds) >>>> 2018/02/27 16:18:13 >>>> RTH|=A0=A0=A0 lat min|=A0=A0=A0 ovl min|=A0=A0=A0 lat avg|=A0=A0=A0 la= t max|=A0=A0=A0 ovl max| = >>>> overruns >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 726|=A0=A0=A0=A0=A0=A0=A0 726|=A0=A0=A0=A0= =A0=A0=A0 887|=A0=A0=A0=A0=A0=A0 5216| 5216|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 705|=A0=A0=A0=A0=A0=A0=A0 705|=A0=A0=A0=A0= =A0=A0=A0 884|=A0=A0=A0=A0=A0=A0 2667| 5216|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 884|=A0=A0=A0=A0=A0=A0 3267| 5216|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 599|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 890|=A0=A0=A0=A0=A0=A0 8122| 8122|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 711|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 884|=A0=A0=A0=A0=A0 15637| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 638|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 882|=A0=A0=A0=A0=A0=A0 6058| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 722|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 877|=A0=A0=A0=A0=A0=A0 3233| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 741|=A0=A0=A0=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=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 598|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 891|=A0=A0=A0=A0=A0=A0 2384| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 701|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 877|=A0=A0=A0=A0=A0=A0 2205| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 642|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 878|=A0=A0=A0=A0=A0=A0 3895| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 590|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 880|=A0=A0=A0=A0=A0=A0 1844| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 725|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 877|=A0=A0=A0=A0=A0=A0 3841| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 549|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 884|=A0=A0=A0=A0=A0=A0 2105| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> 2018/02/27 16:18:35 >>>> RTH|=A0=A0=A0 lat min|=A0=A0=A0 ovl min|=A0=A0=A0 lat avg|=A0=A0=A0 la= t max|=A0=A0=A0 ovl max| = >>>> overruns >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 708|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 880|=A0=A0=A0=A0=A0=A0 3730| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 717|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 875|=A0=A0=A0=A0=A0=A0 3596| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> RTD|=A0=A0=A0=A0=A0=A0=A0 721|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 878|=A0=A0=A0=A0=A0=A0 1470| 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> ^CRTD|=A0=A0=A0=A0=A0=A0=A0 721|=A0=A0=A0=A0=A0=A0=A0 545|=A0=A0=A0=A0= =A0=A0=A0 878|=A0=A0=A0=A0=A0=A0 1470| = >>>> 15637|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0 >>>> >>>> =A0=A0 >>> S =3D 98.696, EXECTIME =3D 0.0105475 >>>> >>>> >>>> $sudo dmesg -T -w >>>> >>>> [Tue Feb 27 16:18:12 2018] I-pipe: head domain RTAI registered. >>>> [Tue Feb 27 16:18:12 2018] RTAI[hal]: mounted. ISOL_CPUS_MASK: 0. >>>> [Tue Feb 27 16:18:12 2018] SYSINFO - # CPUs: 4, TIMER NAME: 'lapic', >>>> TIMER IRQ: 4354, TIMER FREQ: 437999993, CLOCK NAME: 'tsc', CLOCK FREQ: >>>> 3500000000, CPU FREQ: 3500000000, LINUX TIMER IRQ: 4354. >>>> [Tue Feb 27 16:18:12 2018] >>>> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 REMARK: RTAI WILL NOT ACCESS USER = >>>> SPACE ON >>>> STACKS ARGS ITS WAY. >>>> >>>> [Tue Feb 27 16:18:12 2018] RTAI[malloc]: global heap size =3D 2097152 >>>> bytes, <BSD>. >>>> [Tue Feb 27 16:18:12 2018] , kstacks pool size =3D 524288 bytes >>>> [Tue Feb 27 16:18:12 2018] . >>>> [Tue Feb 27 16:18:12 2018] RTAI[sched]: hard timer type/freq =3D >>>> lapic/437999993(Hz); timing: ONESHOT; >>>> [Tue Feb 27 16:18:12 2018] linear timed lists. >>>> [Tue Feb 27 16:18:12 2018] RTAI[sched]: Linux timer freq =3D 250 (Hz), >>>> TimeBase freq =3D 3500000000 hz. >>>> [Tue Feb 27 16:18:12 2018] RTAI[sched]: timer setup =3D 66 ns, resched >>>> latency =3D 0 ns. >>>> [Tue Feb 27 16:18:12 2018] FINAL CALIBRATION SUMMARY (ns): = >>>> KernelLatency >>>> 0, UserLatency 0. >>>> [Tue Feb 27 16:18:39 2018] RTAI[malloc]: unloaded. >>>> [Tue Feb 27 16:18:39 2018] RTAI[sched]: unloaded (forced = >>>> hard/soft/hard >>>> transitions: traps 0, syscalls 0). >>>> [Tue Feb 27 16:18:39 2018] I-pipe: head domain RTAI unregistered. >>>> [Tue Feb 27 16:18:39 2018] RTAI[hal]: unmounted. >>>> >>>> >>>> On 02/24/2018 12:20 AM, josu wrote: >>>>> Yes, of course, I can=92t get real time (much less, 100 us period), = >>>>> only test the procedure. However, setting deadline to 1 (and not = >>>>> 0), the programs run, without hanging the VM. >>>>> >>>>> Although the meaning is not at all the same that in a real system, = >>>>> the latency test are able to run with your run script=A0 (setting a = >>>>> number greater than 0). This is the result: >>>>> >>>>> root@debianRB:/usr/realtime/testsuite/user/latency# ./run >>>>> RTAI Testsuite - USER space latency test (output data in nanoseconds) >>>>> >>>>> *** latency verification tool with real time hardened user space = >>>>> processes/threads *** >>>>> ***=A0=A0=A0 period =3D 100000 (ns),=A0 avrgtime =3D 1 (s)=A0=A0=A0 *= ** >>>>> >>>>> RTAI Testsuite - USER latency (all data in nanoseconds) >>>>> 2018/02/23 22:47:06 >>>>> RTH|=A0=A0=A0 lat min|=A0=A0=A0 ovl min|=A0=A0=A0 lat avg|=A0=A0=A0 l= at max| ovl max|=A0=A0 = >>>>> overruns >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25068|=A0=A0=A0=A0 870103| = >>>>> 870103|=A0=A0=A0=A0=A0=A0=A0=A0 67 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25608|=A0=A0=A0 1007163| = >>>>> 1007163|=A0=A0=A0=A0=A0=A0=A0=A0 95 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25288|=A0=A0=A0=A0 886190| = >>>>> 1007163|=A0=A0=A0=A0=A0=A0=A0 124 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25275|=A0=A0=A0=A0 985017| = >>>>> 1007163|=A0=A0=A0=A0=A0=A0=A0 155 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 24564|=A0=A0=A0=A0 832423| = >>>>> 1007163|=A0=A0=A0=A0=A0=A0=A0 179 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25620|=A0=A0=A0=A0 199742| = >>>>> 1007163|=A0=A0=A0=A0=A0=A0=A0 194 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25393|=A0=A0=A0=A0 881237| = >>>>> 1007163|=A0=A0=A0=A0=A0=A0=A0 226 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25067|=A0=A0=A0=A0 874862| = >>>>> 1007163|=A0=A0=A0=A0=A0=A0=A0 253 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25247|=A0=A0=A0=A0 827829| = >>>>> 1007163|=A0=A0=A0=A0=A0=A0=A0 274 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25566|=A0=A0=A0=A0 855516| = >>>>> 1007163|=A0=A0=A0=A0=A0=A0=A0 310 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 24899|=A0=A0=A0 1035597| = >>>>> 1035597|=A0=A0=A0=A0=A0=A0=A0 360 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25403|=A0=A0=A0=A0 202992| = >>>>> 1035597|=A0=A0=A0=A0=A0=A0=A0 376 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25288|=A0=A0=A0=A0 771628| = >>>>> 1035597|=A0=A0=A0=A0=A0=A0=A0 398 >>>>> RTD|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0=A0=A0=A0=A0=A0=A0=A0=A0 0|=A0= =A0=A0=A0=A0 25288|=A0=A0=A0=A0 771628| = >>>>> 1035597|=A0=A0=A0=A0=A0=A0=A0 398 >>>>> ^C >>>>>>>> S =3D 98.696, EXECTIME =3D 0.0663255 >>>>>> On 24 Feb 2018, at 00:11, Paolo Mantegazza = >>>>>> <[email protected]> wrote: >>>>>> >>>>>> VM changes the matter a lot.=A0 Anticipating the scheduling = >>>>>> deadline by 1 ns does not change anything with respect to 0. >>>>>> In any case it served to indicate that you cannot run the RTAI = >>>>>> tests, simply because VM cannot provide true real time. In = >>>>>> particular it cannot support a 100 us period. >>>>>> I dare saying that if you configure RTAI to use a lower = >>>>>> calibrating frequency, say 2000 Hz , in place of the default = >>>>>> 10000 Hz, you might succeed in trying the RTAI latency tests, = >>>>>> along with the hidden latency calibration. >>>>>> In any case hard real time will likely be a no hope matter. >>>>>> >>>>>> Paolo >>>>>> >>>>>> ________________________________________ >>>>>> From: josu [[email protected]] >>>>>> Sent: Friday, February 23, 2018 10:57 PM >>>>>> To: Paolo Mantegazza >>>>>> Cc: RTAI RTAI >>>>>> Subject: Re: [Rtai] RTAI in debian9 >>>>>> >>>>>> Hi again: >>>>>> >>>>>> First, I want to clarify than I am testing with a VM. Sorry for = >>>>>> the possible misunderstanding. I have been very busy and I have = >>>>>> forgot to say this important point. >>>>>> >>>>>> In any case, I have test your script and the system hangs. = >>>>>> However, making the next change: >>>>>> >>>>>> insmod $MODULES/rtai_sched.ko kernel_latency=3D1 user_latency=3D1 >>>>>> >>>>>> I have obtained the result attached below. >>>>>> >>>>>> josu >>>>>> >>>>>> [cid:[email protected]] >>>>>> >>>>>> On 23 Feb 2018, at 18:56, Paolo Mantegazza = >>>>>> <[email protected]<mailto:[email protected]>> = >>>>>> wrote: >>>>>> >>>>>> May you try the "testsuite/user/latency" test, in your RTAI = >>>>>> install dir, after saving and substituting the existing "run" = >>>>>> script with the one below and then let me know what happened? >>>>>> Do it on an unloaded machined and, if possible, after seeing a = >>>>>> stabilized average latency, attach to your answer also a short = >>>>>> snapshot of what appears on the screen. >>>>>> Thanks, Paolo >>>>>> --------------------------------------------------------------------= --------------------------------------- = >>>>>> >>>>>> #!/bin/sh >>>>>> >>>>>> prefix=3D`rtai-config --prefix` >>>>>> >>>>>> if test "$prefix" =3D ""; then >>>>>> echo "ERROR: please set your PATH variable to <rtai-install>/bin" >>>>>> exit >>>>>> fi >>>>>> >>>>>> MODULES=3D$prefix/modules >>>>>> >>>>>> libpath=3D`rtai-config --library-dir` >>>>>> >>>>>> if test "$libpath" =3D ""; then >>>>>> echo "ERROR: please set your PATH variable to <rtai-install>/bin" >>>>>> exit >>>>>> fi >>>>>> >>>>>> export LD_LIBRARY_PATH=3D$libpath:$LD_LIBRARY_PATH >>>>>> >>>>>> cleanup () { >>>>>> rmmod rtai_msg >>>>>> rmmod rtai_mbx >>>>>> rmmod rtai_sem >>>>>> rmmod rtai_sched >>>>>> rmmod rtai_hal >>>>>> } >>>>>> >>>>>> trap cleanup INT ALRM TERM HUP KILL >>>>>> >>>>>> insmod $MODULES/rtai_hal.ko >>>>>> insmod $MODULES/rtai_sched.ko kernel_latency=3D0 user_latency=3D0 >>>>>> insmod $MODULES/rtai_sem.ko; >>>>>> insmod $MODULES/rtai_mbx.ko; >>>>>> insmod $MODULES/rtai_msg.ko; >>>>>> >>>>>> ./latency & >>>>>> until(`ps -a | grep -q latency`); do sleep 1; done >>>>>> ./display >>>>>> >>>>>> cleanup >>>>>> --------------------------------------------------------------------= --------------------------- = >>>>>> >>>>>> >>>>>> ________________________________________ >>>>>> From: josu jugo [[email protected]<mailto:[email protected]>] >>>>>> Sent: Friday, February 23, 2018 5:37 PM >>>>>> To: Paolo Mantegazza >>>>>> Cc: RTAI RTAI >>>>>> Subject: Re: [Rtai] RTAI in debian9 >>>>>> >>>>>> Hi again: >>>>>> >>>>>> I have test a simple program obtained with rtai-lab (scicoslab = >>>>>> version), monitoring with qrtailab and the system is working. >>>>>> >>>>>> I have load rtai_sched with kernel_latency=3D1000 and = >>>>>> user_latency=3D1000 >>>>>> >>>>>> josu >>>>>> >>>>>> On 23 Feb 2018, at 12:51, josu jugo = >>>>>> <[email protected]<mailto:[email protected]><mailto:[email protected]= s>> = >>>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> <Screen Shot 2018-02-23 at 22.47.37.png> >>>>> _______________________________________________ >>>>> Rtai mailing list >>>>> [email protected] >>>>> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai >>>> _______________________________________________ >>>> Rtai mailing list >>>> [email protected] >>>> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai >> > _______________________________________________ Rtai mailing list [email protected] https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai