Re: Error "Jumps" in long time tests
Jonas Schulze <[email protected]>
| Newsgroups | gmane.linux.real-time.rtai |
|---|---|
| Message-ID | <9342DC0D76E23A4EA3F8BB9084C1AF571D7E28FD@BREMEN.FSRNET.INTRANET.LOCAL> |
I made my project using the additions you suggested, but there is still no change in the latency behaviour. Is there maybe an option I should check out when compiling the kernel? --------------------------- Jonas Schulze, M. Sc. Technische Universität Darmstadt Flugsysteme und Regelungstechnik Otto-Berndt Straße 2 64287 Darmstadt, Germany Tel.: +49(0)6151/16-21077 Fax: +49(0)6151/16-21050 E-Mail: [email protected] URL: www.fsr.tu-darmstadt.de -----Ursprüngliche Nachricht----- Von: Paolo Mantegazza [mailto:[email protected]] Gesendet: 25 November 2015 12:58 An: Jonas Schulze; [email protected] Betreff: Re: AW: AW: AW: [Rtai] Error "Jumps" in long time tests On 11/25/2015 10:50 AM, Jonas Schulze wrote: > Hi Paolo, > > thanks again for your input. I replaced the pthread.h and use rtai_posix.h now. Additionally I will try put the flags you suggested in my QT project. > > But however I have one more question: if the mutexes were not in hard real time before, wouldn't they have caused a SYSCALL warning in the demsg output? Because I never got one of these... As I said: "Nonetheless, I cannot be sure of that because what was linked in it could depend on your making way" For example, I think that if you linked with llxrt first it is possible that you satisfied the entry points using RTAI support. Moreover if there has been no contention there should have been also no need for a futex syscall (I think that is the kernel support behind POSIX mutexes when acquiring a mutex that is already in the hand of another task). My suggestion aims at making you sure of using the related RTAI functions. Paolo. > Regards > Jonas > > --------------------------- > Jonas Schulze, M. Sc. > Technische Universität Darmstadt > Flugsysteme und Regelungstechnik > Otto-Berndt Straße 2 > 64287 Darmstadt, Germany > > Tel.: +49(0)6151/16-21077 > Fax: +49(0)6151/16-21050 > E-Mail: [email protected] > URL: www.fsr.tu-darmstadt.de > > > > -----Ursprüngliche Nachricht----- > Von: Paolo Mantegazza [mailto:[email protected]] > Gesendet: 24 November 2015 22:18 > An: Jonas Schulze; [email protected] > Betreff: RE: AW: AW: [Rtai] Error "Jumps" in long time tests > > Please have a look at the attachment. It does not support your claims. I let you check what you could have done wrong. > You should also notice that your test case is nothing but the nth latency checker. You could have avoided loosing time by simply going to testsuite/user/latency/latency.c, set the period to 25000000 and let it run for hours. > Since I do not see the inclusion of rtai_posix.h, there are chances that you linked in the LInux posix lib, so that the use of your mutexes was not in real time. > Nonetheless, I cannot be sure of that because what was linked in it could depend on your making way. > If you want to use posix apis in hard real time I suggest you to follow what attached and have it made with something like this: > RENAME = $(shell rtai-config --posix-wrap) > $(CC) $(LXRT_CFLAGS) -o ...................... $(RENAME) > $(LXRT_LDFLAGS) -llxrt > > You sent me C++ but I changed it in palin C, as usual. > > Paolo. > _______________________________________ > From: Jonas Schulze [[email protected]] > Sent: Tuesday, November 24, 2015 8:34 AM > To: Paolo Mantegazza; [email protected] > Subject: AW: AW: AW: [Rtai] Error "Jumps" in long time tests > > Hi, > > attached is my code stripped down to its core. I verified the jumps again with some long time runs over the weekend. 10 hours test, starting at 20 microsecs and jumping to 2100 microsecs (see attached PNG). > > Best Regards > Jonas > > --------------------------- > Jonas Schulze, M. Sc. > Technische Universität Darmstadt > Flugsysteme und Regelungstechnik > Otto-Berndt Straße 2 > 64287 Darmstadt, Germany > > Tel.: +49(0)6151/16-21077 > Fax: +49(0)6151/16-21050 > E-Mail: [email protected]<mailto:[email protected]> > URL: www.fsr.tu-darmstadt.de<http://www.fsr.tu-darmstadt.de/> > > > > Von: Paolo Mantegazza [mailto:[email protected]] > Gesendet: 20 November 2015 15:27 > An: Jonas Schulze; [email protected] > Betreff: Re: AW: AW: [Rtai] Error "Jumps" in long time tests > > On 11/20/2015 03:08 PM, Jonas Schulze wrote: > No Im actually using rt_start_timer(0), as I read it in an example code my program is based on. > > The I've to wait for your code to check your problem hands on. > Paolo > > Jonas > > --------------------------- > Jonas Schulze, M. Sc. > Technische Universität Darmstadt > Flugsysteme und Regelungstechnik > Otto-Berndt Straße 2 > 64287 Darmstadt, Germany > > Tel.: +49(0)6151/16-21077 > Fax: +49(0)6151/16-21050 > E-Mail: [email protected]<mailto:[email protected]> > URL: www.fsr.tu-darmstadt.de<http://www.fsr.tu-darmstadt.de> > > > > Von: Paolo Mantegazza [mailto:[email protected]] > Gesendet: 20 November 2015 15:06 > An: Jonas Schulze; [email protected]<mailto:[email protected]> > Betreff: Re: AW: [Rtai] Error "Jumps" in long time tests > > On 11/20/2015 02:24 PM, Jonas Schulze wrote: > Hi Paolo, > > the machine has following futures: > > . Gigabyte GA-MA78GPM Motherboard > . AMD Athlon X-2 Dualcore 4450e > . 2GB RAM > > Im using RTAI 4.1 on a 3.16 kernel. > > Not sure about the meaning of "UP-SMP". > > Thanks for your offer to send you the program, but I need to strip it down a bit so you don't have to deal with my unnecessary messy code. That may take until next week. > > > Meanwhile I've guessed that in your code there is likely a line similar to this: start_rt_timer(nano2count(25000000)). > Am I right? > Paolo > > > > Best Regard > Jonas > > --------------------------- > Jonas Schulze, M. Sc. > Technische Universität Darmstadt > Flugsysteme und Regelungstechnik > Otto-Berndt Straße 2 > 64287 Darmstadt, Germany > > Tel.: +49(0)6151/16-21077 > Fax: +49(0)6151/16-21050 > E-Mail: [email protected]<mailto:[email protected]> > URL: www.fsr.tu-darmstadt.de<http://www.fsr.tu-darmstadt.de> > > > > Von: Paolo Mantegazza [mailto:[email protected]] > Gesendet: 20 November 2015 14:06 > An: Jonas Schulze; [email protected]<mailto:[email protected]> > Betreff: Re: [Rtai] Error "Jumps" in long time tests > > Machine type and features? UP-SMP? RTAI version? If before RTAI-4.0: hardware timer (start_rt_timer) in oneshot or periodic mode? > If the program is simple and arch neutral, could you send it to me? > > Paolo > > On 11/20/2015 01:42 PM, Jonas Schulze wrote: > Hi all, > > Im currently testing RTAI on several machines to determine which one is best suitable for my purposes. To do so, I have have a simple program that runs two concurrent loops, one in soft real time and one in hard realtime. The realtime task is running in a specific periodic time (0.025 sec currently) and terminates after a user specified end of iterations. In every realtime loop I check the time it was called (using rt_get_time_ns) and compare it to the last time it was called to determine the error that was made with respect to the defined period. > > Now I did tests running the program for two hours and ten hours. In both tests there are distinctive times where the error "jumps" to a higher value (from one iteration to the next), it is not increasing constantly. In between the jumps, the error varies only within small values. > > To give you an idea here are some rough error values. There was no other load on the system than the test program and Ubuntu running, no internet connection: > > Two hour test, system was fresh booted: > +-20 microsec until minute 4 -> Jump > +-40 microsec unitl minute 14 -> Jump > +-60 microsec until minute 31 -> Jump > +-100 microsec until minute 62 -> Jump -200 microsec until end > > Ten hour test (system was already running for 8 hours) > +1000/-700 microsc until minute 41 -> Jump 1300/-1800 microsec until > +minute 5854 (9.7 hours) -> Jump 3800/-2400 microsec until end > > Is there anything that is causing those jumps in the error? Is it maybe some option I didn't know about when compiling the kernel? Or is this a normal behaviour of RTAI? > > Best Regards and thanks for any hints > Jonas > > > > > > --------------------------- > Jonas Schulze, M. Sc. > Technische Universität Darmstadt > Flugsysteme und Regelungstechnik > Otto-Berndt Straße 2 > 64287 Darmstadt, Germany > > Tel.: +49(0)6151/16-21077 > Fax: +49(0)6151/16-21050 > E-Mail: [email protected]<mailto:[email protected]> > URL: www.fsr.tu-darmstadt.de<http://www.fsr.tu-darmstadt.de> > > > > > > > > > > _______________________________________________ > > Rtai mailing list > > [email protected]<mailto:[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