I've noticed that the only difference really with latency is having a trimmed down kernel configuration with ALL of the debugging and security options disabled, but one of the things I'll be making to the kernel is using the -O3 flag as well to maximize the performance of context switching:
www.phoronix.com/review/linux-kernel-o3/5
"Out of all the benchmarks carried out, the Stress-NG context switching benchmark reported the most significant gain out of the -O3 optimized kernel build."
Context switching can impact latency so the -O3 flag to the kernel should help, and I'll be building the kernel with LTO as well.
All of this will be hosted on the `linuxcnc` branch of my Gentoo repo:
github.com/NTULINUX/gentoo_backup/tree/linuxcnc
The release will be posted here:
github.com/NTULINUX/gentoo_backup/releases
And the installer will handle all the work for you. The installer is also designed to be installed to a USB flash drive (as long as you use UEFI, for some reason legacy doesn't work off USB but it could just be my motherboard.)
Installer is here, but it's out-of-date:
github.com/NTULINUX/gentoo_backup/blob/linuxcnc/installer.sh
And here's the wiki for everything:
openlunchbox.com/mw19/index.php/HOWTO:_Gentoo_for_LinuxCNC
The installer works on Debian too but you must be running Bookworm or newer (sid or testing)
And if you're using Debian Bookworm with a PREEMPT_RT kernel but want to use a UEFI installation, you must have `efi=runtime` specified on the kernel command line, or simply use a non PREEMPT_RT kernel when running the installer.
I'll be making a few announcements once it's finished.
One more thing, Debian formats drives in really weird ways so the installer is designed to wipe out and handle partition all by itself (partition sizes are asked during the script as it is interactive) but it uses the whole disk by design, so grab a spare hard drive, NVMe or USB drive that you're happy wiping out and use that for the install. I'll be updating the wiki as well.
I'd be truly surprised if somehow Clear Linux is faster than the image I'll be pushing out the next week or so. Also, the Gentoo installer/image is free of SystemD.