> Hi, I want to run a periodic task every 500 us and measure the > performance of the RTLinux scheduler. I've tried to do this in the > following way: > > I run a RT-task as shown in the code below and print the deviation > from the previous run to /dev/rtf0. While the task is running I do > 'cat /dev/rtf0 > out.hex' to gather the statistics to a file. I then > use a program to analyze this file and make a histogram > representation of the deviations. > > Running the code below and "cating" the way mentioned I get the > following with no(!) other CPU load:
why don't you simpley use example/rt_process.o - that will give you a good estimation of the scheduling jitter if you let it run for a while and run the monitor app along side. cd examples/measurements/ insmod rt_process.o ./monitor | tee data ...let it run for a few days... <CNTRL-C> ./gist data > result in result you get a "histogram" of the jitter measurement. note though that this histogram is distorted due to not taking every value but the maxima of each ntest series, but it should be enough to verify your test results. also any chance that the problem is in the data conversion or data rate ? rtfifos can loos data - and the question is what your hex converter does if something is missing or it wrapps around at the end of the fifo buffer unaligned . could you verify that reslut by adding a few lines to the inner loop like: ... long long min,max; .... min=20000; max=-20000; while(1) { ... dt=t - prev - kPeriod; if(dt<min){min=dt; rtl_printf("new min %d\n",min);} if(dt>max){max=dt; rtl_printf("new max %d\n",min);} rtf_put(0,&dt,sizeof(dt)); ... the negative values that you are reporting just look wrong . > > [Elements] 9293 > [Max] 44992 > [Min] -102720 hofrat _______________________________________________ Rtl mailing list [EMAIL PROTECTED] http://www2.fsmlabs.com/mailman/listinfo.cgi/rtl