ODroid as raplacement for Raspberry Pi

More
3 years 8 months ago #264804 by rodw
So I went back to Armbian.
I was able to build an Armbian image  from scratch. Using their current branch (kernel 6.1), Bookworm would boot from the eMMC card if it was first booted from pettit boot on flash memory.

But we had a mismatch with the PREEMPT_RT patch and it failed to build so I went to their edge branch which gave me Kernel  6.2 rc3 which worked but only boots from an SD card. But I pressed on and modified the build process to apply the Preempt_rt patch from kernel org (also 6.2 rc3) and output deb files for linux-image-rt and linux-headers. These were copied to the SD card and installed using dpkg -i
After a reboot sucess! We had PREEMPT_RT!

I installed linuxcnc from the debian repos and had failure! The menu opened, but sims would not open and latency test stayed on 0
Out of time tonight but next step is to build linuxcnc from source and see what happens!

If I have a win with linuxcnc, I'll document the process. I have had a lot of guidance from one of the Armbian guys to get this far... 
The following user(s) said Thank You: CarterKraft

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #264909 by alangibson
So after a solid week of poking around, I've got tobetter's 5.10 realtime kernel running on their Ubuntu 22.04 image. With 7 glxgears running, the latency histogram reports a steady 14 us latency. With stress-ng running a one CPU hog on each of 4 isolated CPUs, latency histogram reports a steady 20 us latency. Not bad!

Here's a rough script for manually executing if you want to try it out:

github.com/alangibson/linuxcnc-realtime

> we reformatted the code to use a PREEMPT_RT thread!

That's awesome. I think you set a record for lowest time from concept to implementation. I'd be very interested to see what numbers you get with the above image. Is LinuxCNC just doing software stepping in a while loop now or something?
The following user(s) said Thank You: Bari

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #264912 by Bari
The real test for latency has been starting Firefox and then playing a youtube. If the latency stays low after 10-15 minutes it should stay low for just about anything.

Glxgears and stress-ng can actually have low latency results after several minutes of testing that immediately gets annihilated by starting FF and youtubes.

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #264916 by rodw
Awesome work. My PREEMPT_RT build was a failure. Everything looks right but something goes awry with threading. Do you have an image you can share somewhere?  I can give you write access to my Google Drive if you don't have space or bandwidth.

I can't see anywhere where you get the kernel patches in your script. Has Tobetter's image already got it in there?
If we can migrate the process to Armbian's build system, the process will be  a lot easier.
You have given me a few clues to check on.

Bari, Away form the linuxcnc project, cyclictest is the latency tool that was written by the RT kernel team. I just found out about it and its inclded in the rt-tests package in Debian. When I get there, I wat to play with it too. Just does not have pretty graphics. I see Allan runs it in his scripts.

Allan, It would be good to see the output from cyclictest as it speaks  a language other RT guys understand.

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #264926 by Bari
Yes we use cyclictest to compare to other systems than run cyclictest. However, FF + youtubes gives us the worst latency test scores vs any other tests, cyclictest included..
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
3 years 8 months ago #264934 by alangibson
> The real test for latency has been starting Firefox and then playing a youtube.

You have to be careful when doing stress testing. The test needs to look like the load you expect to have for the numbers to be relevant. The workload of this board is only LinuxCNC, no browsing or video decoding ever. And AFAIK the workload of decoding video is nothing like the workload of running LinuxCNC.

If you go by playing video, then you're getting absolute worst case numbers of the board as a video decoder, not the board as a LinuxCNC host. Now if you were going to use the board to watch video while LinuxCNC was running, then I agree that playing a video as a load test would be good. But this board will run LinuxCNC in kiosk mode.
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

Time to create page: 0.286 seconds
Powered by Kunena Forum