From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "Javier Martínez Cantos" <jmartinez@ixion.es>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Unexpected CPU assignment on iMX6Q
Date: Mon, 15 Feb 2016 13:15:18 +0100 [thread overview]
Message-ID: <20160215121518.GC9903@hermes.click-hack.org> (raw)
In-Reply-To: <56C1B8F1.5070506@ixion.es>
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
next prev parent reply other threads:[~2016-02-15 12:15 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 [this message]
2016-02-15 13:02 ` Javier Martínez Cantos
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=20160215121518.GC9903@hermes.click-hack.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=jmartinez@ixion.es \
--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.