Tool/software: TI-RTOS
what should i do
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.
how you get above results? :
ti-processor-sdk-linux-am57xx-evm-05.01.00.11/board-support/extra-drivers/jailhouse-0.8/inmates/ti_app/ti-app.c
we had try make a fpga i/o 1ms interrupt the am5728 ,but the sometimes latency is same for a long times.
What is your goal in terms of latency numbers?
we want more communication bus on sysbios,max latency > 1ms is dont work, or max latency should max latency < 10us.
Hi,
The ti-app.c uses dedicated timer to generate interrupts and uses the same timer to measure interrupt latency. By reading the time at entrance of the interrupt handler the app knows the latency.
To make it work as a jailhouse inmate the Linux dts file explicitly says that this timer and this interrupt will not be used by Linux, but by the inmate.
The cell configuration also need to take care about the timer's memory map and the interrupts usage by the inmate
The RTOS configuration file also should take care about interrupt configuration and times that are allowed for the RTOS inmate.
You didn't provide any specific information about your application, how you configure Linux DTS, cell configuration and all inmate resources allocation. There is no any specific details about your inmate. it is not clear what the FPGA is and what generates the interrupts. If that is not a timer, than how do you measure the interrupt latency. Please could you provide details of you application and the setup.
Thanks
Please look at my data carefully!!!!!!!!!!
There is interrupt latency data for running RTOS application w/o the Jailhouse !!!
Prove that it can run as a standalone RTOS application with a worst interrupt latency of 10us.
But when I put it in the jailhouse, the worst case for interrupt latency is up to 2ms.
Hi, could you please send your "ti-app" TI-RTOS version project (or makefile), binaries, etc. So we can reproduce your results?
thank you,
Paula
thanks,i had move my project to idkAM5728,so you can test on idkAM5728 board.
zip include CCS project、jailhouse cell files、dts and launch.sh
Ok, thank you for your work.
This is a CCS project which you need.
The same tools versions (XDC, Sysbios, PDK, etc) and same compiler/linker project options as the CCS project which running RTOS Int latency test w/o Jailhouse.
Ok, thank you for your work.
(Let me know if this agree with your results)YES.It is my results.
Because I optimized the program, so the TEST1 max jiiter ~570us, and there will be not get max jitter ~2ms.TEST1 NO need to leave the test running longer.
We want to know why TEST1 is so much bigger than TEST2.
And how do I get TEST1 results closer to TEST2.
Hi, after checking your code, I did few modifications which helped a little bit to reduce jitter. Summary list of changes below:
• I think you had timer2 by mistake enabled in *.cfg. As a test, I built RTOS application using “TimerSupport.availMask = 0x0080;”. It worked OK.
• I compared your app.cfg and the one from TI_RTOS_PSKD/../jailhouse/rtos/icss-emac . I merged differences that I considered applied, such as MMU settings, CacheEnable, and timer number. Attached new project for your reference.
With changes, max jitter is ~500us, however, I only saw once the jitter close to 500us, most of the time is ~47us, and once in a while ~180us
Summary results:
New results Jailhouse-RTOS:
jitter: 4783 ns, min: 2720 ns, max: 509300 ns
jitter: 4702 ns, min: 2720 ns, max: 509300 ns
jitter: 4726 ns, min: 2720 ns, max: 509300 ns
jitter: 4726 ns, min: 2720 ns, max: 509300 ns
Previous results Jailhouse-RTOS:
jitter: 19969 ns, min: 18722 ns, max: 568618 ns
jitter: 21409 ns, min: 18722 ns, max: 568618 ns
jitter: 19500 ns, min: 18722 ns, max: 568618 ns
jitter: 19202 ns, min: 18722 ns, max: 568618 ns
I am checking with our MMU experts if there is any additional optimization with can do for TIMER8 memory region. However, please keep in mind that getting same results as baremetal might not be possible, as SYSBIOS might some times runs other tasks in the background.
thank you,
Paula
Yes, I have enable timer2 and timer8 on inmate.
Our application scenario is industry.
We want the maximum interrupt delay to be less than 50us.
Best regards.
Hi, we are working on getting a better understanding on what could cause max int latency to go up once in a while. We would need more time to analyze it. I will come back here when we have more information.
thank you,
Paula
Tanks for your work.
The test code for orangepi lite needs to be sorted out before I can publish it.
Now there is a new test phenomenon.
When sysbios is used as the inmate test interrupt delay for jailhouse, core0 enters the tab button via serial or runs for(;;);, which causes a large interrupt latency.
Hi, please let me give you an update.
After analyzing Lauterbach debugger traces, it was noticed a correlation between a MPU LDO change and the increase in RTOS Interrupt latency.
Noticed LDO value change, typically implies a change from OPP-NOM to OPP-OD or OPP-HIGH.
For a test, we fixed CPU MAX, MIN to a value (1500000). With this workaround we haven't seen Interrupt latency go higher than 100us (our arbitrary set max threshold)
Changes done:
root@am57xx-evm:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_available_governors
conservative userspace powersave ondemand performance schedutil
root@am57xx-evm:/sys/devices/system/cpu/cpu0/cpufreq# echo performance > scaling_governor
root@am57xx-evm:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_governor
performance
root@am57xx-evm:/sys/devices/system/cpu/cpu0/cpufreq# cat cpuinfo_max_freq
1500000
root@am57xx-evm:/sys/devices/system/cpu/cpu0/cpufreq# cat cpuinfo_min_freq
1000000
root@am57xx-evm:/sys/devices/system/cpu/cpu0/cpufreq# cat cpuinfo_cur_freq
1500000
root@am57xx-evm:/sys/devices/system/cpu/cpu0/cpufreq# echo 1500000 > scaling_min_freq
root@am57xx-evm:/sys/devices/system/cpu/cpu0/cpufreq# cat scaling_min_freq
1500000
This found was reported to our Linux team for a fix. I will keep you update it. But, in the meantime, I was wondering if you could give a try to the workaround in your setup? if so, please let us know the results
thank you,
Paula