* [Xenomai] Unexpected CPU assignment on iMX6Q
@ 2016-02-15 11:39 Javier Martínez Cantos
2016-02-15 12:15 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Javier Martínez Cantos @ 2016-02-15 11:39 UTC (permalink / raw)
To: xenomai
Hi everybody,
I'm currently working on Toradex Apalis iMX6Q (4 cores) with Xenomai
2.6.4. The system runs fine.
However, I'm playing around with rt_task_create and T_CPU obtaining the
following results:
- T_CPU(0-3) leads to task creation on expected core, i.e. 1 to 4,
- while T_CPU(>3) leads to task creation always on first core.
Affinity is configured as follows:
cat /proc/xenomai/affinity
0000000f
I expect rt_task_create to return an EINVAL error or something like that
when T_CPU is higher than RTHAL_NR_CPUS - 1.
Could RTHAL_NR_CPUS has a value higher than 4? How can I check this? I
have already checked that CONFIG_NR_CPUS is 4.
On runtime, how can I query the "task to core assignment" through
Xenomai API?
Thanks in advance.
--
Javier Martínez Cantos
Sistemas embarcados
Julián Camarillo, 21 B, 3ª Planta 28037 Madrid, España
(+34) 91 440 18 33
jmartinez@ixion.es
http://www.ixion.es <http://www.ixion.es/>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/This message is intended solely for its addressee. It may contain
privileged and/or confidential information, whose disclosure is
prohibited by law. If you have received this message in error, please do
not read, copy or distribute it and notify the dispatcher immediately./
/
Este correo electrónico está dirigido exclusivamente a su destinatario y
puede contener información sujeta a reserva y/o confidencial, cuya
revelación está prohibida por ley. Si Ud. ha recibido este mensaje por
error, le rogamos que no lo lea, copie o distribuya y que lo notifique
de inmediato a su remitente./
--
Javier Martínez Cantos
Sistemas embarcados
Julián Camarillo, 21 B, 3ª Planta 28037 Madrid, España
(+34) 91 440 18 33
jmartinez@ixion.es
<.////172.20.31.5/datos/IXION/Info_public/Logos/Nueva%2520imagen%2520corporativa/Plantillas/xxxx@ixion.es%2520>
http://www.ixion.es <http://www.ixion.es/>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/This message is intended solely for its addressee. It may contain
privileged and/or confidential information, whose disclosure is
prohibited by law. If you have received this message in error, please do
not read, copy or distribute it and notify the dispatcher immediately./
/
Este correo electrónico está dirigido exclusivamente a su destinatario y
puede contener información sujeta a reserva y/o confidencial, cuya
revelación está prohibida por ley. Si Ud. ha recibido este mensaje por
error, le rogamos que no lo lea, copie o distribuya y que lo notifique
de inmediato a su remitente./
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai] Unexpected CPU assignment on iMX6Q
2016-02-15 11:39 [Xenomai] Unexpected CPU assignment on iMX6Q Javier Martínez Cantos
@ 2016-02-15 12:15 ` Gilles Chanteperdrix
2016-02-15 13:02 ` Javier Martínez Cantos
0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2016-02-15 12:15 UTC (permalink / raw)
To: Javier Martínez Cantos; +Cc: xenomai
On Mon, Feb 15, 2016 at 12:39:29PM +0100, Javier Martínez Cantos wrote:
> Hi everybody,
>
> I'm currently working on Toradex Apalis iMX6Q (4 cores) with Xenomai
> 2.6.4. The system runs fine.
>
> However, I'm playing around with rt_task_create and T_CPU obtaining the
> following results:
>
> - T_CPU(0-3) leads to task creation on expected core, i.e. 1 to 4,
>
> - while T_CPU(>3) leads to task creation always on first core.
>
> Affinity is configured as follows:
>
> cat /proc/xenomai/affinity
> 0000000f
>
> I expect rt_task_create to return an EINVAL error or something like that
> when T_CPU is higher than RTHAL_NR_CPUS - 1.
The affinity is used when starting the task with rt_task_start, not
when creating it. And indeed, rt_task_start should return -EINVAL if
no cpu is found for running the task.
>
> Could RTHAL_NR_CPUS has a value higher than 4? How can I check this? I
> have already checked that CONFIG_NR_CPUS is 4.
NR_CPUS does not matter, xnpod_start_thread does a "bitwise and" with
cpu_online_mask.
>
> On runtime, how can I query the "task to core assignment" through
> Xenomai API?
I am not sure there is a way. You can check /proc/xenomai/sched or
/proc/xenomai/stat though.
--
Gilles.
https://click-hack.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Xenomai] Unexpected CPU assignment on iMX6Q
2016-02-15 12:15 ` Gilles Chanteperdrix
@ 2016-02-15 13:02 ` Javier Martínez Cantos
0 siblings, 0 replies; 3+ messages in thread
From: Javier Martínez Cantos @ 2016-02-15 13:02 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: xenomai
On 15/02/16 13:15, Gilles Chanteperdrix wrote:
> On Mon, Feb 15, 2016 at 12:39:29PM +0100, Javier Martínez Cantos wrote:
>> Hi everybody,
>>
>> I'm currently working on Toradex Apalis iMX6Q (4 cores) with Xenomai
>> 2.6.4. The system runs fine.
>>
>> However, I'm playing around with rt_task_create and T_CPU obtaining the
>> following results:
>>
>> - T_CPU(0-3) leads to task creation on expected core, i.e. 1 to 4,
>>
>> - while T_CPU(>3) leads to task creation always on first core.
>>
>> Affinity is configured as follows:
>>
>> cat /proc/xenomai/affinity
>> 0000000f
>>
>> I expect rt_task_create to return an EINVAL error or something like that
>> when T_CPU is higher than RTHAL_NR_CPUS - 1.
> The affinity is used when starting the task with rt_task_start, not
> when creating it. And indeed, rt_task_start should return -EINVAL if
> no cpu is found for running the task.
Ok, I misunderstood. Anyway it is unexpected.
Once rt_task_create is called with -say- T_CPU(20), rt_task_start
returns 0 (success) and the target task is launched on first core (index 0).
What's wrong?
>> Could RTHAL_NR_CPUS has a value higher than 4? How can I check this? I
>> have already checked that CONFIG_NR_CPUS is 4.
> NR_CPUS does not matter, xnpod_start_thread does a "bitwise and" with
> cpu_online_mask.
I'll explore this path.
>> On runtime, how can I query the "task to core assignment" through
>> Xenomai API?
> I am not sure there is a way. You can check /proc/xenomai/sched or
> /proc/xenomai/stat though.
>
Thank you Gilles.
--
Javier Martínez Cantos
Sistemas embarcados
Julián Camarillo, 21 B, 3ª Planta 28037 Madrid, España
(+34) 91 440 18 33
jmartinez@ixion.es
<.////172.20.31.5/datos/IXION/Info_public/Logos/Nueva%2520imagen%2520corporativa/Plantillas/xxxx@ixion.es%2520>
http://www.ixion.es <http://www.ixion.es/>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
/This message is intended solely for its addressee. It may contain
privileged and/or confidential information, whose disclosure is
prohibited by law. If you have received this message in error, please do
not read, copy or distribute it and notify the dispatcher immediately./
/
Este correo electrónico está dirigido exclusivamente a su destinatario y
puede contener información sujeta a reserva y/o confidencial, cuya
revelación está prohibida por ley. Si Ud. ha recibido este mensaje por
error, le rogamos que no lo lea, copie o distribuya y que lo notifique
de inmediato a su remitente./
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-15 13:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-15 11:39 [Xenomai] Unexpected CPU assignment on iMX6Q Javier Martínez Cantos
2016-02-15 12:15 ` Gilles Chanteperdrix
2016-02-15 13:02 ` Javier Martínez Cantos
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.