Error while Running Linuxcnc

More
26 Sep 2024 23:18 #310860 by PCW
Replied by PCW on topic Error while Running Linuxcnc
Yes, your Ethernet interface is named enp4s0

Look like ethtool is not included in your linuxcnc distribution

Note that if you have Realtek hardware you will need to load the DKMS driver
(and ethtool in not needed, ethtool is only needed for Intel Ethernet hardware)

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

More
26 Sep 2024 23:34 #310863 by rajsekhar
Replied by rajsekhar on topic Error while Running Linuxcnc
Ok, understood.

But please confirm whether Interrupt in CPU0 is correct or not. 

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

More
27 Sep 2024 00:12 #310864 by PCW
Replied by PCW on topic Error while Running Linuxcnc
Yes, looks like only CPU 0 get interrupts from enp4s0.

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

More
27 Sep 2024 01:17 #310865 by rajsekhar
Replied by rajsekhar on topic Error while Running Linuxcnc
But with isolcpu=1, I understand that servothread runs in CPU1 and by irq balance setting, we are aiming the ethernet interrupts in CPU1, not in CPU0.

Am I correct?

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

More
27 Sep 2024 02:34 #310868 by PCW
Replied by PCW on topic Error while Running Linuxcnc
As a test, you can try running this utility to pin the IRQ

 

File Attachment:

File Name: pinirq_2024-09-26.txt
File Size:1 KB


First download  then

chmod +x pinirq.txt

 then

sudo ./pinirq.txt enp4s0


This utility can check the mask:

 

File Attachment:

File Name: checkmask_...9-26.txt
File Size:1 KB

 
Attachments:

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

More
27 Sep 2024 03:46 #310871 by rajsekhar
Replied by rajsekhar on topic Error while Running Linuxcnc
Both scripts runs and results as follows:
===========================================================
raycnc1@debian:~/Downloads$ sudo ./pinirq_2024-09-26.txt enp4s0
Cores: 2
Old CPU Mask: 2
Set device enp4s0 IRQ 32 CPU mask to 2
raycnc1@debian:~/Downloads$ sudo ./checkmask_2024-09-26.txt enp4s0
Cores: 2
Actual CPU Mask: 2
Desired CPU Mask: 2
IRQ: 32
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-6.1.0-18-rt-amd64 root=UUID=bc617657-6a6c-4afa-9a67-ef553e3b2439 ro initrd=/install/gtk/initrd.gz quiet isolcpus=1
raycnc1@debian:~/Downloads$
==========================================================

I did not understand the result though. Is it ok?













 

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

More
27 Sep 2024 04:58 #310874 by rajsekhar
Replied by rajsekhar on topic Error while Running Linuxcnc
One interesting point I noticed, if, after booting LCNC, I run pinirq script first time and 2nd time, results are different and as follows:
==============================================================
raycnc1@debian:~/Downloads$ sudo ./pinirq_2024-09-26.txt enp4s0
[sudo] password for raycnc1:
Cores: 2
Old CPU Mask: 3
Set device enp4s0 IRQ 32 CPU mask to 2
raycnc1@debian:~/Downloads$ sudo ./pinirq_2024-09-26.txt enp4s0
Cores: 2
Old CPU Mask: 2
Set device enp4s0 IRQ 32 CPU mask to 2
raycnc1@debian:~/Downloads$
==============================================================

the "Old CPU Mask:" is different.
if I run LCNC after pinirq script is run once, interrupts goes to CPU1 as desired.

So what should I do? How to run this script on start-up?
 

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

More
27 Sep 2024 14:00 #310885 by rajsekhar
Replied by rajsekhar on topic Error while Running Linuxcnc
Realtek driver R8168 installed. It certainly improved tmax parameter (hm2 read tmax was 3330000, now 1300000).

But IRQ could not be set to CPU1 automatically. PCW script sets it manually, but mozmck script did not work, at least till now.

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

More
27 Sep 2024 14:06 #310887 by PCW
Replied by PCW on topic Error while Running Linuxcnc
Does LinuxCNC run without error? maybe installing the driver is sufficient.

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

More
27 Sep 2024 15:16 #310895 by rajsekhar
Replied by rajsekhar on topic Error while Running Linuxcnc
No. error finishing read continues.

The result I posted in above last post is with IRQ in CPU1.

I have attached two screen shot with latency numbers and tmax values (linuxcnc and latency test run together). Please refer the file name for CPU number.

I noticed that while it was running (i.e before read error occured), the tmax values were similar, bur with IRQ to CPU0, network-latency spikes appear and causes read error.

So, IRQ affinity is a must.
Attachments:

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

Moderators: PCWjmelson
Time to create page: 0.099 seconds
Powered by Kunena Forum