every millicsecond interrupt in xenomai domain on a am355x board can cause something wrong?

梁权 liang_1911 at 163.com
Wed Dec 5 05:17:05 CET 2018

hi, Philippe. i have tried with linux kernel 4.9.28+ipipe-core-4.9.38-arm-3.patch; it works fine for hours.
And i will do a long time test tonight.
Here,i also want to ask another question: because there is something wrong with the am3352's timer1 on my board,
after i power on the board for serverl hours, the kernel told me that:
[ 7313.887896] WARNING: Underflow in clocksource 'ipipe_tsc' observed, time update ignored.
[ 7313.887904]          Please report this, consider using a different clocksource, if possible.
[ 7313.887907]          Your kernel is probably still fine.
i wonder to know how much this issue would impact the xenomai's real-time performace? 
If it just have dozens of microseconds addtional latency to the xenomai's real-time task,  i think it is acceptalbe on my project.
And also, there is also another solution to get rid of this problem. That is changing the input clock source of am3352's timer1 from 24M to 32K. When change to 32K input source, the kernel print as following when booting:
[    0.000000] I-pipe, 0.032 MHz clocksource, wrap in 134217727 ms
Wether this change will impact the xenomai's performance very much? 
Compared with the former , which is the better solution?  Any replys will be appreciate.

At 2018-12-02 18:00:44, "Philippe Gerum" <rpm at xenomai.org> wrote:
>On 12/2/18 8:07 AM, 梁权 wrote:
>> To simplify the problem, i do a test without QT like the following program:
>> #define MALLOC_SIZE 8*1024*1024
>> int main()
>> {
>> int err;
>> char *addr=(char *)0;
>> time_t now;
>> struct tm *timenow;
>> time(&now);
>> timenow = localtime(&now);
>> printf("%s\n", asctime(timenow));
>> addr = (char *)malloc(MALLOC_SIZE);
>> if (addr)
>> printf("malloc ok\n");
>> do
>> {
>> if (addr){
>> memset(addr, 0x12, MALLOC_SIZE/2);
>>                         memset(addr + MALLOC_SIZE/2, 0x34, MALLOC_SIZE/2);
>> }
>> usleep(1000);
>> }while(1);
>> return 0;
>> }
>> After i enable the interrupt for several minutes,  the error occur:
>> root at am335x-evm:~/tmp# ./testMemset
>Ok, thanks for investing time in creating this test snippet. I'll divert
>some cycles in a few days to look into this.

More information about the Xenomai mailing list