Discussion:
RTAI CPU Affinity
(too old to reply)
andy pugh
2017-02-22 14:34:19 UTC
Permalink
Raw Message
Can anyone confirm or deny that LinuxCNC knows how to run RTAI on an
isolated CPU?

http://forum.linuxcnc.org/18-computer/32214-howto-schedule-realtime-tasks-to-cpu1-when-isolcpus-1#88498
--
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, 1916
Gene Heskett
2017-02-22 14:43:59 UTC
Permalink
Raw Message
Post by andy pugh
Can anyone confirm or deny that LinuxCNC knows how to run RTAI on an
isolated CPU?
http://forum.linuxcnc.org/18-computer/32214-howto-schedule-realtime-ta
sks-to-cpu1-when-isolcpus-1#88498
Its doing it well on 3 of my machines, but does not show up in an htop
report.

Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
bari
2017-02-22 19:25:20 UTC
Permalink
Raw Message
Yes. Linuxcnc runs RTAI on an isolated cpu. It does so by default and
you don't have to use isolcpus=x for the past few years.

Use this tree and RTAI will work with Linuxcnc:
https://github.com/NTULINUX/RTAI
Post by andy pugh
Can anyone confirm or deny that LinuxCNC knows how to run RTAI on an
isolated CPU?
http://forum.linuxcnc.org/18-computer/32214-howto-schedule-realtime-tasks-to-cpu1-when-isolcpus-1#88498
andy pugh
2017-02-23 09:48:13 UTC
Permalink
Raw Message
Post by bari
Yes. Linuxcnc runs RTAI on an isolated cpu. It does so by default and
you don't have to use isolcpus=x for the past few years.
https://github.com/NTULINUX/RTAI
Is this true of the LiveCD-distributed version of LinuxCNC, or only if
using your linked code?
--
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, 1916
Alec Ari
2017-02-24 05:12:14 UTC
Permalink
Raw Message
Post by andy pugh
Is this true of the LiveCD-distributed version of LinuxCNC, or only if
using your linked code?
The RTAI tree for LinuxCNC (NTULINUX, me) has many fixes not included in RTAI mainline such as to the timer, math, scheduler, and HAL code. isolcpus is no longer required, I have thoroughly tested that branch myself across several 64-bit SMP systems, 4 cores to 8 cores, and have had no issues, regardless if isolcpus is specified or not.


The tree hasn't been touched in awhile but it works as-is with LinuxCNC with no gotchas that I could find. isolcpus isn't necessarily "on" in that branch by default, it still works, but it isn't needed and can safely be left out.

I have not seen an instance where a real-time thread jumps across cores with that branch, with or without isolcpus, but I also have SCHED_MC and SCHED_SMT disabled. Enabling those and certain ACPI and IOMMU options may cause unexpected behavior, latency spikes, core jumping, etc.

This commit I assume fixes the issue of having interrupt remapping enabled (IOMMU option) with IPIPE enabled (instant boot failure after kernel decompression) but other problems may still remain depending on kernel configuration as the kernel patches (lazily) do not properly blacklist all the potentially conflicting options in Kconfig.


http://git.xenomai.org/ipipe.git/commit/?h=ipipe-4.1.y&id=1e5297761dd8d1c5b29d978863571ee62040a6af

Hope this helps!

Alec Ari

Loading...