I don’t see anything from “zcat /proc/config.gz | grep CONFIG_RT_GROUP”.
Really? You don’t even see it not being set like in my case? That’s strange, you are running this on the device outside of any container yes?
When we start the container with SYS_NICE, pthread_setschedprio works and in top we now see negative PR values which means we’re running real-time.
That’s expected since you need to grant the container with SYS_NICE
capabilities to affect things like kernel process priority and scheduling inside the container.
About the serial ports, we’re using the second native serial port (ttymxc1) to talk to a GPS receiver, and we’re using a USB/serial chip port (ttyACM0) to talk to the higher output sensor. The issue is on the native serial port.
Just to confirm, have you tried swapping which serial port each of your devices are connected to? For example if you put the GPS receiver on ttyACM0 does it behave better now or is the issue still present? I want to make sure the issue is indeed with this specific serial port itself and not some other factor.
Are you aware of any issues with running threads with PR -50 or higher priority on that version of TorizonCore?
I am not. Though to be fair I don’t hear from too many users that set the process priority like this. Real-time in general is not something that is used by too many of our customers so it’s more difficult to discover issues related to real-time.
Could this be happening because CONFIG_RT_GROUP_SCHED is not set?
There’s no proof that this configuration is at all related to the issues you are observing. The only reason I brought this up, is because this configuration is required to use those docker runtime options you were looking at, in the start of this thread. All I know is that setting this kernel configuration would allow you to use these runtime options. There’s no guarantee that it will actually help your situation.
Yes I’d like that as part of the default image. That might help us, and I’d guess we’re not the only real-time applications.
We’re working on migrating to the latest TorizonCore (6.7), we know that will get us over a year of fixes and improvements.
Before we explore this option, could you try a little experiment for me. So you’re currently on an older Torizon OS version (5.7.0) which uses an older version of the Linux kernel as well. If possible could you try your setup on the latest Torizon (6.7.0). This version of the OS uses a newer version of the Linux kernel. I’m curious if just using a newer version of the kernel fixes, or at least improves your situation. This could be the case since there are hundred of fixes and changes to the Linux kernel with every new version.
This would at least be worth a try before we go and try adding any new kernel configurations, that we’re not even sure will help.
Best Regards,
Jeremias