Re: Question about isolating CPU's

Paolo Mantegazza <[email protected]>
Newsgroups gmane.linux.real-time.rtai
Message-ID <[email protected]>
Isolating a CPU means just that no Linux task will be on that CPU.
Nonetheless even a standard Linux task can appear onto an isolated CPU 
if sched_affinity is used to force it there.
Thus kernel worker threads can still be found on isolated CPUS.
Then, in the same way, it's up to you to force the tasks you want onto 
any preferred CPU, whether isolated or not, using a single bit enabled 
mask in rt_task_init_schmod (and its likes).
There have been a few RTAI versions in which it took the burden to force 
all of Linux, irqs and task, off the isolated CPUs. I abandoned it 
because if was unreliable on the Linux side. Sometime ending with RTAI 
working impaired but with Linux stalled.
Therefore I've preferred to leave the burden to any user wanting to 
force isolation even more.
Take into account that moving all Linux irqs off isolated CPUs can be 
done, within plain Linux, by simply echoing appropriate irq affinity 
masks, while for moving the tasks off a simple module should be written.
There is a README in RTAI explaining something more and Linux 
Documentation has another document.

My way of working with what available is to: isolate CPUS, write a 
simple script to move Linux itqs away my isolated CPUS, pu onto the 
isolated CPUS the most demanding hard real time tasks (in term of 
latency), place the other RTAI tasks on the non isolated CPUS.

Paolo


On 04/13/2016 03:14 PM, Felix Frey wrote:
> Hi
>
> I have a dual core CPU and want to reserve one core for RTAI,
> so I start Linux with "isolcpus=0"
>
> cat /proc/rtai/hal shows:
>
> ** RTAI/x86:
>
>      CPU   Frequency: 998053000 (Hz)
>      TIMER Frequency: 6238219 (Hz)
>      TIMER Latency: 0 (ns)
>      TIMER Setup: 160 (ns)
>
> ** Real-time IRQs used by RTAI:
>
>      #45 at ffffffffa0119050
>      #4352 at ffffffffa00b94a0
>      #4353 at ffffffffa00b8cc0
>      #4355 at ffffffff810dd8f0
>
> ** RTAI extension traps:
>
> ** RTAI SYSREQs in use: #1 #2
>
> ** MASK OF CPUs ISOLATED FOR RTAI: 0x1.
>
> So far, everything is fine.
>
> cat /proc/rtai/scheduler shows:
>
> RTAI LXRT Real Time Task Scheduler.
>
>      Calibrated Time Base Frequency: 998053000 Hz
>      Calibrated user space latency: 2999 ns
>      Calibrated kernel space latency: 2999 ns
>      Calibrated oneshot timer setup_to_firing time: 160 ns
>
> Number of RT CPUs in system: 2 (sized for 2)
>
> Global heap: size =    2097152, used =      30592; <BSD>.
> Kstack heap: size =     524288, used =          0; <BSD>.
>
> Number of forced hard/soft/hard transitions: traps 0, syscalls 0
>
> Priority  Period(ns)  FPU  Sig  State  CPU  Task  HD/SF  PID  RT_TASK *
>   TIME
> ------------------------------------------------------------------------------
> 1000000000 0           Yes  No  0x3    0:1   1      0    959
> 2          0           Yes  No  0x3    0:1   2      1    1097
> 0          0           Yes  No  0x1    0:1   3      1    1099
> 1000000050 0           Yes  No  0x0    0:1   4      0    1105
> TIMED
>
> READY
> 1000000050 0           Yes  No  0x0    1:2   5      0    1089
> 1          0           Yes  No  0x3    1:2   6      1    1098
> 1000000050 0           Yes  No  0x0    1:2   7      0    1103
> TIMED
>
>
> Now, I expect all rt-task to be on the same core.
> So what means the CPU column?
>
> Can anybody help with interpreting the table above?
>
> Thanks,
> Felix
> _______________________________________________
> Rtai mailing list
> [email protected]
> https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai

_______________________________________________
Rtai mailing list
[email protected]
https://mail.rtai.org/cgi-bin/mailman/listinfo/rtai
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.