All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Native skin rt_task_create/rt_task_shadow doesn't inherit affinity
@ 2012-10-17 11:28 Arnout Vandecappelle
  2012-10-17 12:32 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2012-10-17 11:28 UTC (permalink / raw)
  To: xenomai

   Hoi,

   I noticed that when using the native skin, starting an application with
"taskset 2 <my_app>" does not put the application on processor 2.  Diving into
the code, it turns out that calling rt_task_shadow() throws away the thread's
cpuset, and also rt_task_create() looks only at the mode parameter and ignores
the parent thread's affinity.

   Is this intentional?  If yes, that means that using the native skin, there
is no way to set a task's affinity except explicitly specifying T_CPU when
the task is started, right?

   Note, by the way, that calling sched_setaffinity _after_ the task has started
_will_ change the affinity (cfr. switchtest), but any calls _before_ the task
has started are ignored.

   If it is not intentional, I think the attached patch solves the problem.

   Regards,
   Arnout
-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xenomai-affinity.patch
Type: text/x-patch
Size: 706 bytes
Desc: not available
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20121017/45d52a61/attachment.bin>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-10-17 22:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 11:28 [Xenomai] Native skin rt_task_create/rt_task_shadow doesn't inherit affinity Arnout Vandecappelle
2012-10-17 12:32 ` Gilles Chanteperdrix
2012-10-17 13:02   ` Arnout Vandecappelle
2012-10-17 13:10     ` Gilles Chanteperdrix
2012-10-17 16:33       ` Arnout Vandecappelle
2012-10-17 19:59         ` Gilles Chanteperdrix
2012-10-17 22:02           ` Arnout Vandecappelle

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.