From: "Javier Martínez Cantos" <jmartinez@ixion.es>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Unexpected CPU assignment on iMX6Q
Date: Mon, 15 Feb 2016 14:02:53 +0100 [thread overview]
Message-ID: <56C1CC7D.6080006@ixion.es> (raw)
In-Reply-To: <20160215121518.GC9903@hermes.click-hack.org>
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./
prev parent reply other threads:[~2016-02-15 13:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56C1CC7D.6080006@ixion.es \
--to=jmartinez@ixion.es \
--cc=gilles.chanteperdrix@xenomai.org \
--cc=xenomai@xenomai.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.