#linuxcnc-devel Logs
May 21 2023
#linuxcnc-devel Calendar
10:41 AM linuxcnc-build2: Build [#943](http://buildbot2.highlab.com/buildbot/#builders/19/builds/943) of `10-rip.debian-08-jessie-i386` 4failed.
11:34 AM Unterhaus_ is now known as Unterhausen
11:40 AM seb_kuzminsky: has anyone tried the debian.org 6.3 rt kernel in experimental? https://packages.debian.org/search?keywords=linux-image-rt-amd64
12:20 PM pcw-home: this one? 6.3.1-1~exp1: amd64
12:26 PM linuxcnc-build2: Worker `precise-rtai-i386` is missing. It was seen last on Sun May 21 10:26:11 2023.
12:36 PM seb_kuzminsky: yeah that's the one i was thinking of
12:36 PM seb_kuzminsky: i've learned from rod webster that 6.3 has better latency than 6.1 on at least some platforms
12:37 PM pcw-home: Yes, and I have found 6.3.1 and 6.4.2 are better still
12:38 PM pcw-home: also for Ethernet using isolcpus and pinning the Ethernet IRQ to the isolated CPU further improves network latency
12:39 PM seb_kuzminsky: that's great to hear
12:39 PM pcw-home: I can try the debian kernel
12:41 PM seb_kuzminsky: while playing with busywait i found improved latency by moving all interrupts *off* the rt cpu (using the `irqaffinity` kernel cmdline argument), but something more is needed to get the hm2_eth interrupts back on to the rt cpu
12:41 PM seb_kuzminsky: it would also be ideal to move away from kernel command line arguments and to something more dynamic that can be set up after the system is booted, based on how many cpus are detected and what nic is found, etc
12:42 PM seb_kuzminsky: there's a bunch of stuff in systemd (cough, cough) to manage cpusets, which could maybe be used to replace isolcpus, but i didn't get to the bottom of it
12:42 PM pcw-home: Yeah a script that you give the Ethernet device name maybe
12:43 PM seb_kuzminsky: yeah exactly
12:43 PM pcw-home: same thing could setup the interfaces file
12:44 PM seb_kuzminsky: i like it
12:47 PM pcw-home: Let me try that debian kernel...
01:55 PM pcw-home: Debian RT 6.3.0 seems OK maybe a little bit worse than 6.3.1 or 6.4.2 on network latency
02:06 PM pcw-home: Ahh just got a dropped packet so Debian 6.3.0 is definitely worse than home-built 6.3.1 or 6.4.2
02:58 PM JT-Woodshop: pcw-home, how do you pin the Ethernet IRQ to the isolated CPU?
03:00 PM pcw-home: first you need to find which IRQ is associated with the real time Ethernet device
03:02 PM pcw-home: so if for example your Ethernet device for LinuxCNC is eno1 you would
03:02 PM pcw-home: grep eno1 /proc/interrupts
03:03 PM pcw-home: The first number is the IRQ number
03:04 PM pcw-home: now if for example you have a 4 core processor and you have isolated the last core (isolcpus=3)
03:04 PM pcw-home: you would (as root)
03:05 PM pcw-home: echo "8" > /proc/irq/25/smp_affinity
03:06 PM pcw-home: (8 is a bit mask for processor 3)
03:06 PM pcw-home: =2^3
03:07 PM pcw-home: really needs a script...
03:09 PM pcw-home: forgot to say the 25 was the irq number the grep command listed
03:21 PM JT-Shop: thanks
03:21 PM * JT-Shop takes notes
05:11 PM seb_kuzminsky: thanks for checking, pcw-home, i'll try to put that stuff in a script
07:22 PM pcw-home: Debian 6.3.0 RT ~5 minutes at 1 KHz servo thread --> timed out RX packet (>700 usec)
07:39 PM pcw-home: 6.4.2 RT 5 hours at 2 KHz servo thread (so far) no timeouts
07:39 PM JT-Cave: nice
07:39 PM pcw-home: both running normal desktop stuff videos etc