- Posts: 17524
- Thank you received: 0
Error while Running Linuxcnc
2 years 1 month ago #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)
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 to join the conversation.
2 years 1 month ago #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.
But please confirm whether Interrupt in CPU0 is correct or not.
Please Log in to join the conversation.
2 years 1 month ago #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 to join the conversation.
2 years 1 month ago #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?
Am I correct?
Please Log in to join the conversation.
2 years 1 month ago #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
First download then
chmod +x pinirq.txt
then
sudo ./pinirq.txt enp4s0
This utility can check the mask:
Attachment not found
First download then
chmod +x pinirq.txt
then
sudo ./pinirq.txt enp4s0
This utility can check the mask:
Attachment not found
Please Log in to join the conversation.
2 years 1 month ago #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?
===========================================================
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 to join the conversation.
2 years 1 month ago #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?
==============================================================
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 to join the conversation.
2 years 1 month ago #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.
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 to join the conversation.
2 years 1 month ago #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 to join the conversation.
2 years 1 month ago #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.
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.
Please Log in to join the conversation.
Time to create page: 0.150 seconds
