CPU affinity and scheduler

Jan Kiszka jan.kiszka at siemens.com
Thu Jan 7 13:22:39 CET 2021


On 02.01.21 11:38, Leandro Bucci via Xenomai wrote:
> Hello and happy new year to all. I wanted to ask you in detail what this
> line means:
> 
> isolcpus=0,1 xenomai.supported_cpus=0x3
> 
> I understand that 2 CPUs are isolated. (I'm working on a Raspberry). But in
> what sense are they isolated? does it mean that if a xenomai Task runs on
> one of the two CPUs it will never migrate to another CPU? instead what does
> "xenomai supported CPU" mean? that only that CPU supports Xenomai? but then
> why is CPU 3 not isolated?
> 

isolcpus specifies the isolation for Linux tasks: Nothing is put on this
CPUs by Linux unless explicitly requested (eg. via taskset or thread
affinities) or strictly required (a few kernel threads). That helps to
keep those core free for RT jobs.

supported_cpus then tells Xenomai to only schedule on those cores and do
not intercept Linux (except where technically needed) on the others.
That parameter is specified as mask, thus core ID 0 and 1 are selected here.

All that does not protect you from hardware related interference,
though. Caches might be shared between the core groups, just like I/O paths.

HTH,
Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux



More information about the Xenomai mailing list