Attached is the modified script I use. This also put other IRQs on other CPUs. I have 8 cores and some value is still hardcoded.
Second script print assigned IRQs. In addition to this I also added below to kernel command line: isolcpus=managed_irq,domain,7 nohz=on nohz_full=7 rcu_nocbs=7 irqaffinity=0-6 kthread_cpus=0-6 skew_tick=1 At least on Debian this is done by editing the file /etc/default/grub and run below command: sudo update-grub I conclude it work well by looking at timestamp ofreceived Ethercat frames. Use wireshark, export dissections, wrote a small command to read in timestamps in C++ compiled into an .oct file so I could read values into Octave and plot them. I have also tried to the functions clock_gettime(...) and dprintf(...) to save execution times in a file. It however seems it sometimes some extra delay. I have spotted delay of above 1 millisecond then using this method to time execution time. Nicklas Karlsson sön 2026-09-20 klockan 06:38 +0200 skrev [email protected]: > Did you try Hannes script? > https://github.com/hdiethelm/xenomai4-linuxcnc/issues/2#issuecomment- > 5345811568 > > I350 must be combined. > > "---------- Původní zpráva ---------- > Od: Nicklas SB Karlsson <[email protected]> > Datum: 20.09.2026 02:26:23 > Předmět: Re: [Emc-users] Ethernet send packets jitter > > Yes isolate the last CPU and pin the Ethernet IRQd to that CPU and pin other > interrupts seems to do the trick. > Running for six minutes worst delay of received packet is slightly above 153 > µs. > > If some other interrupt prevented receiving of ethernet frame it also agree > with latency on receive I measured > earlier. > > This is on the I350 card there I previously had delays of up to around 15 > milliseconds followed by a burst of > receives. If I could get the hardware time trigger to sending of frames then > transmission would be perfect, > equally spaced exactly at the intended, this is a small detail I do not > however think make any difference in > practice. > > Regard Nicklas Karlsson > > > tor 2026-09-17 klockan 07:28 -0700 skrev Peter Wallace: > > On Thu, 17 Sep 2026, andy pugh wrote: > > > > > On Wed, 16 Sept 2026 at 21:20, Nicklas SB Karlsson wrote: > > > > > > > Running Linuxcnc and send receive Ethernet jitter is small for most > packets but sometimes there is delay of well > > > > above on millisecond, running for maybe a minute or so worst case is > between 6...7 milliseconds. > > > > > > Maybe you need to disable IRQ coalescing? It's mentioned briefly in > > > the hm2_eth docs, but also might be relevant to EtherCAT. > > > https://linuxcnc.org/docs/stable/html/man/man9/hm2_eth.9.html > > > > > > (It's at least a google-able phrase for further investigation) > > > > At least for hm2_eth, basic Network latency improvement methods are: > > > > > > On Intel (and some less common others like broadcom), disable IRQ > coalescing > > > > On Realtek, install the DKMS driver (the stock Linux driver has multi-ms > > random latencies) > > > > On all, use isolcpus (or whatever the newer scheme is called) to isolate > the > > last CPU, and then pin the Ethernet IRQ to that CPU. > > > > Use the latest kernel (I have a test system that always got random > timeouts, > > say once a day, with 6.x kernels, this was totally fixed with a 7.X kernel > > > > > > > > > > -- > > > atp > > > "A motorcycle is a bicycle with a pandemonium attachment and is > > > designed for the especial use of mechanical geniuses, daredevils and > > > lunatics." > > > ? George Fitch, Atlanta Constitution Newspaper, 1912 > > > > > > > > > _______________________________________________ > > > Emc-users mailing list > > > [email protected] > > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > > Peter Wallace > > Mesa Electronics > > > > > > _______________________________________________ > > Emc-users mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/emc-users > > > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users > " > _______________________________________________ > Emc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-users
irq_affinity_prirority.sh
Description: application/shellscript
irq_print.sh
Description: application/shellscript
_______________________________________________ Emc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-users
