Going from Devian 10 to 12 has created problems

More
26 Sep 2025 00:55 - 26 Sep 2025 00:55 #335442 by PCW
I should note that the the pinirq script runs as expected on the LinuxCNC/Debian 12 image
Last edit: 26 Sep 2025 00:55 by PCW.

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

More
26 Sep 2025 14:00 #335454 by jcbryant
PCW - you were right.  Your script does in fact work nicely:

john@Taig:~/temp$ sudo ./pinirq_2025-09-25-2.txt enp1s0
Cores: 2
Old CPU Mask: 3
Set device enp1s0 IRQ 29 CPU mask to 2

I'm staggered and confused.  As I see it, the script simply does a bit of work to find the irq number for the specified device and then executes (in this case) "echo 2 > /proc/irq/29/smp_affinity".  How can this possibly work from a script when exactly the same command is rejected when entered directly?  Sudo must indeed be strange.  When I get a moment I'll try a one line script containing just the one command.  Presumably it will work.????  At least I now understand the irq folder.  I had failed to consider the possibility that it was present but hidden.

Pinning the interrupt dramatically changes the ping test results for the better:

--- 10.10.10.10 ping statistics ---
60000 packets transmitted, 60000 received, 0% packet loss, time 60084ms
rtt min/avg/max/mdev = 0.074/0.080/0.212/0.007 ms
john@Taig:~/temp$ sudo chrt 99 ping -i.001 -q -c 60000 10.10.10.10
PING 10.10.10.10 (10.10.10.10) 56(84) bytes of data.

--- 10.10.10.10 ping statistics ---
60000 packets transmitted, 60000 received, 0% packet loss, time 60101ms
rtt min/avg/max/mdev = 0.073/0.081/0.212/0.007 ms
john@Taig:~/temp$ sudo chrt 99 ping -i.001 -q -c 60000 10.10.10.10
PING 10.10.10.10 (10.10.10.10) 56(84) bytes of data.

--- 10.10.10.10 ping statistics ---
60000 packets transmitted, 60000 received, 0% packet loss, time 60084ms
rtt min/avg/max/mdev = 0.074/0.080/0.211/0.007 ms

With all round trips taking well under a millisecond, the fact that the total times for the tests are all > 60000ms is presumably due to delays in scheduling each ping.  In any case I now feel a LOT more confident that the erhernet communications are adequate for Linux CNC.

rodw:

I've looked into EEE, but unfortunately my ethtool appears to be an empty shell that doesn't actually support  any operations of interest:

john@Taig:~$ sudo ethtool --show-eee enp1s0
netlink error: Operation not supported
john@Taig:~$ sudo ethtool --set-eee enp1s0 eee off
netlink error: Operation not supported
john@Taig:~$ sudo ethtool --show-coalesce enp1s0 
netlink error: Operation not supported

Any ideas?  is there an alternate tool?  Can I somehow get a better version of ethtool?  Is it possible that my hardware is so ancient that the chips don't support EEE in any case?

Re compiling my own version of the kernel, both of you greatly overestimate my ability to handle such a task.  Basically I'm a newcomer to Linux and am still groping my way around.  Just getting from Buster to Bookworm was a monumental effort for me.  Given my limited abilities, I think that a better approach would be to simply install the Linux CNC 2.9.4 Bookworm ISO.  I presume that those maintaining Linux CNC know what they're doing, and that the kernel included in this release has been appropriately optimized.

 

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

More
26 Sep 2025 14:58 #335455 by PCW
The issue with sudo and the command line is that the redirect (>) is done by the shell
and the shell is just running with your normal user permissions.

sudo -c bash 'echo 2 > /proc/irq/29/smp-affinity'

should work (as will a simplified 1 line script)

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

More
27 Sep 2025 13:40 #335487 by jcbryant
Thank you very much for explaining this. I do hate not understanding things. And I now understand how it can be that simply writing to a file effect irq's, and why changes made don't persist after a reboot (something else that was troubling me). Clearly this is an instance of a pseudo file system (something I'd never heard of until this morning).

This whole experience has extended my limited knowledge of Linux. And, incredibly enough, I now seem to have a functioning system. The diagnostic tests look good and, although I've hardly stressed it very much, Linux CNC appears to be perfectly functional save for the fact that the Axis window won't maximize. I'll start a separate thread on this as it's a pretty specific issue. Hopefully a solution will turn up, and f none does I've also found some workarounds.

Many thanks to both of you for responding. Were it not for you two I would never have got things working.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum