This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5728: Cyclictest problem in SDK rt version

Part Number: AM5728

Tool/software: Linux

Since 5728 support Preempt RT Linux ,so I made 2 tests.

The first one is ti-processor-sdk-linux-rt-am57xx-evm-03.03.00.04 version ,which includes linux-rt-4.4.41+gitAUTOINC+968d071ce9-g968d071ce9 kernel.

After installtion, the

cyclictest -t 5 -p 80 -n gives the result

T:0(1487) P:80 I:1000 C:7326365 Min:8 Act:9 Avg: 9 Max:37

T:1(1488) P:80 I:1500 C:4884243 Min:7 Act:9 Avg: 9 Max:29

T:2(1489) P:80 I:2000 C:3663177 Min:8 Act:9 Avg: 9 Max:49

T:3(1490) P:80 I:2500 C:2930542 Min:8 Act:9 Avg: 9 Max:35

T:4(1491) P:80 I:3000 C:2442118 Min:8 Act:9 Avg: 9 Max:35

The result is excellent in max latency.

However, the second test on ti-processor-sdk-linux-rt-am57xx-evm-04.03.00.05, which includes linux-rt-4.9.69+gitAUTOINC+7069a470d5-g7069a470d5 kernel, is bad. The result is 

T:0(954) P:80 I:1000 C:91521 Min:7 Act:20 Avg: 15 Max:6653

T:1(955) P:80 I:1500 C:61067 Min:8 Act:12 Avg: 14 Max:7155

T:2(956) P:80 I:2000 C:45673 Min:8 Act:9 Avg: 22 Max:6690

T:3(957) P:80 I:2500 C:36712 Min:8 Act:11 Avg: 10 Max:6202

T:4(958) P:80 I:3000 C:30597 Min:8 Act:12 Avg: 10 Max:281

It seems that the Preempt RT patch in linux is not working at all, I want to know the reason. Is that the problem of kernel itself?

Thank you.

  • Hi,
    I agree those are not good numbers. I will look at confirming your results.

    Did you use a TI EVM for your test? If so which one?

    Have you tried the current 5.02 SDK?

    Best Regards,
    Schuyler
  • Thank you for your attention,


    The first two tests were made on third party board named JN-5728mini.  http://www.jiang-niu.com/product-detail.html?id=2


    The bad latency problem may caused by my rebuilding of SDK on JN-5728mini, I will rebuild and check it again.

    Then I made a third test on TMDSIDK574 for 5.02 SDK, the result is good as follow.
    T: 0 ( 1063) P:80 I:1000 C: 2277 Min: 9 Act: 11 Avg: 11 Max: 46
    T: 1 ( 1064) P:80 I:1500 C: 1518 Min: 9 Act: 9 Avg: 11 Max: 46
    T: 2 ( 1065) P:80 I:2000 C: 1138 Min: 9 Act: 11 Avg: 11 Max: 34
    T: 3 ( 1066) P:80 I:2500 C: 910 Min: 9 Act: 10 Avg: 11 Max: 45
    T: 4 ( 1067) P:80 I:3000 C: 820 Min: 9 Act: 14 Avg: 11 Max: 42

  • Hi,

    I setup a AM5728 EVM running the 4.03.00.05 SDK and ran cyclictest I did not see the same the results for this kernel that you are seeing. I think the reason is the kernel version you mentioned is for the non-RT SDK kernel and not the RT kernel. Below is the "uname -a" output on the kernel i used which is showing a 4.9.65 kernel version, the non-RT version is 4.9.69.

    Linux am57xx-evm 4.9.65-rt23-g7069a470d5 #2 SMP PREEMPT RT Mon Mar 26 12:04:24 EDT 2018 armv7l GNU/Linux

    One other thing I noticed is that the -m or mlockall option was not used, this locks current and future memory allocations into DDR. This improves performance as shown below. The first is the test run without the -m and the second run with the -m which shows some improvement in max latency per thread overall. I did not include the histogram output here.

    root@am57xx-evm:~# cyclictest -t 5 -p 80 -n -D 5M -h 75
    # /dev/cpu_dma_latency set to 0us
    policy: fifo: loadavg: 0.04 0.12 0.08 1/252 1237

    T: 0 ( 1124) P:80 I:1000 C: 299656 Min: 8 Act: 12 Avg: 10 Max: 39
    T: 1 ( 1125) P:80 I:1000 C: 299656 Min: 7 Act: 10 Avg: 10 Max: 47
    T: 2 ( 1126) P:80 I:1000 C: 299656 Min: 7 Act: 9 Avg: 10 Max: 40
    T: 3 ( 1127) P:80 I:1000 C: 299656 Min: 7 Act: 10 Avg: 10 Max: 50
    T: 4 ( 1128) P:80 I:1000 C: 299991 Min: 7 Act: 11 Avg: 10 Max: 39

    root@am57xx-evm:~# cyclictest -t 5 -p 80 -m -n -D 5M -h 75
    # /dev/cpu_dma_latency set to 0us
    policy: fifo: loadavg: 0.00 0.00 0.02 1/250 1248

    T: 0 ( 1240) P:80 I:1000 C: 299767 Min: 7 Act: 9 Avg: 9 Max: 41
    T: 1 ( 1241) P:80 I:1000 C: 299741 Min: 8 Act: 9 Avg: 10 Max: 31
    T: 2 ( 1242) P:80 I:1000 C: 299718 Min: 8 Act: 9 Avg: 9 Max: 29
    T: 3 ( 1243) P:80 I:1000 C: 299694 Min: 8 Act: 9 Avg: 9 Max: 30
    T: 4 ( 1244) P:80 I:1000 C: 299670 Min: 8 Act: 9 Avg: 9 Max: 32

    Best Regards,
    Schuyler