All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Xenomai-help] [Newbie question] threads and task CPU affinity
@ 2007-05-24 10:12 RAKOTOSALAMA, Nirilanto
  2007-05-24 12:07 ` Jan Kiszka
  0 siblings, 1 reply; 18+ messages in thread
From: RAKOTOSALAMA, Nirilanto @ 2007-05-24 10:12 UTC (permalink / raw)
  To: jan.kiszka; +Cc: xenomai

Thanks Jan,

It's more and more clear.
Just a question, I've a little doubt. Native tasks do not inherit
affinity from their parent process. I've read that cpu affinity 
setting at pthread creation is only availablle in kernel space.
Do Posix skin threads inherit affinity from their parent, in user space?

If not, when I "sched_setaffinity" a parent process, I have to 
recursively "sched_setaffinity" all its threads and force them to
switch to primary mode. Is it right ?

> >>> Hello,
> >>>
> >>> I have some question about CPU affinity with Xenomai 2.3.1.
> >>> (it is to see if  xenomai support developing for a cpu 
> >> manager library is feasible)
> >>
> >> What will this library do? (/me just nosy)
> > 
> > In fact, there's simulation programs that run on many 
> different systems (hard + soft),
> > and to make this applications as portable as possible, they 
> use libraries developed for every
> > systems (dec alpha, pc, specific cards, linux, unix). And, 
> I search if xenomai could be used
> > with less re-implementation effort, so the more posix 
> function are developed by xenomai, 
> > the better it is, and easier it is (for me :p).
> > So first step is developing this libraries xenomai support 
> (e.g. timer, cpu).
> > This cpu library should provides "simple" functions like : 
> getting the number of cpu,
> > setting/getting the cpu affinity for a process passing its 
> pid, protect/un-protect cpu from running
> > unwanted process.
> 
> OK, I see.
> 
> > 
> >>> When using rt_task_create, CPU mask can be specified. 
> >> However, when sched_setaffinity is called 
> >>> to modify main program affinity, and after, rt_task_create 
> >> is called without specifying CPU mask,
> >>> did the child task inherits from the main program affinity ?
> >> If you don't provide a target CPU (either on creation or via
> >> /proc/xenomai/affinity), better consider the affinity as 
> unspecified
> >> (any possible CPU). The target CPU derives from Linux 
> >> decision where to
> >> put the thread non-RT boot code on, Xenomai just nails 
> that decision
> >> down until someone explicitly migrates.
> >>
> >>> Same question for Posix skin threads ?
> >>>
> >>> Can native task affinity be set other than when creating ? 
> >> using sdhed_setaffinity ?
> >>
> >> /proc/xenomai/affinity (has global scope) or 
> >> sched_setaffinity. Xenomai
> >> shadow threads follow the migration that may took place while in
> >> secondary mode, and sched_setaffinity comes with such a 
> mode switch.
> > 
> > Thanks, If I have well understood, tasks or threads 
> affinity can be set using /proc/xenomai/affinity
> > but, I have read that /proc/xenomai/affinity does not exist 
> in xenomai 2.3.1 and xenomai must be patched
> 
> Yes, it's an upcoming feature of 2.4.
> 
> > (I don't know how because I don't have nor SVN neither 
> internet connection on my xenomai boxes).
> 
> There is a daily snapshot on gna.org: 
> https://gna.org/svn/?group=xenomai
> 
> > So I can use sched_setaffinity, but it make switch to 
> secondary mode. 
> > Does'nt matter if only threads must be RT and 
> sched_setaffinity is called during a non-rt init phase, does it ?
> 
> Yep.
> 
> > That means that affinity does'nt depend on running on 
> xenomai or secondary mode ?
> 
> Sorry, doesn't parse for me right now.
> 
> > 
> > BTW, is protecting a CPU with xenomai possible ? 
> > Does xenomai use /dev/cpuset or an other device ?
> 
> Xenomai doesn't directly interact with cpuset -- but... if you force
> some RT process into a certain CPU and you don't override 
> this decision
> on RT thread creation, Xenomai will follow as explained.
> 
> Jan
> 
> 
> This mail has originated outside your organization, either 
> from an external partner or the Global Internet.
> Keep this in mind if you answer this message.
> 
> 
> 

This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.




^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [Xenomai-help] [Newbie question] threads and task CPU affinity
@ 2007-06-01  8:36 RAKOTOSALAMA, Nirilanto
  0 siblings, 0 replies; 18+ messages in thread
From: RAKOTOSALAMA, Nirilanto @ 2007-06-01  8:36 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai, Jan Kiszka

> > > Hi,
> > > 
> > > I'm still blocked on a CPU affinity problem.
> > > In order to adapt a set affinity function which is based on
> > > posix linux lib :
> > > - CPU_AssignPID(uint32 PID, uint32 CPU_id)
> > > - the cpu affinity of the caller and all its child threads 
> > must be set to CPU_id.
> > > 
> > > Problems are:
> > > Child PIDs must be listed, the only means I found is 
> > listing pids using `ls /proc/"Parent pid"/ > temp_file`
> > > And each listed pid is sched_setaffinity'ed.
> > > I don't know if setting affinity of RT threads from an 
> > other thread (parent) using pid works with xenomai.
> > > 
> > > So, my question is :
> > > With xenomai, is recursively cpu affinity setting from a 
> > parent thread, a good way of doing ?
> > > I read switchtest program, and I conclude that in a xenomai 
> > and RT perspective, it seems "nicer"
> > > to set affinity each threads separately during their init 
> > phase before the RT infinite loop.
> > > Otherwise, setting affinity after child threads creation 
> > from its parent, may switch them into 
> > > secondary mode during their RT loop, and at an unknown moment.
> > > Argumentation is important for my internship because I have 
> > to port on xenomai a very big RT 
> > > posix based application. And I should justify any 
> > modifications and prevent potential problems.
> > > 
> > > Sorry, I don't know if it is clear.
> > 
> > I think that it is safe to assume that if the affinity of a 
> thread is
> > inherited from the thread that created it with Linux posix 
> > library, the
> > same will happen with Xenomai.
> > 
> > Now, if you want to set the affinity of a group of threads 
> after their
> > creation, I do not see how to do this without walking 
> through the list
> > of threads. If your library has an abstraction for threads, 
> > you can keep
> > them in a list. It will be useful at process exit time to 
> > cleanly cancel
> > all threads (this may be useful if you want to detect leaks 
> > for instance).
> > 
> > Note that when talking about scheduling affinity function, we are
> > swimming in the undefined, since these functions are not 
> > standardized by
> > posix.
> > 
> > But since you are porting a library to Xenomai maybe you can 
> > have a look
> > at the current implementation of CPU_AssignPID ?
> > 
> > -- 
> >                                                  Gilles Chanteperdrix
> 
> Thanks,
> Precisly, the current implementation has nothing curious and 
> there is no reason it does not work on xenomai but,
> in a simple program that just switches the cpu :
> Before CPU_assignpid call, 'ps -ax -0 SCHED | grep <pid>'
> and '/proc/xenomai/sched' returns the same result (i.e. the 
> current thread runs on the same cpu)
> After CPU_assignpid call, 'ps -ax -0 SCHED | grep <pid>' 
> shows that threads cpu has switched
> whereas '/proc/xenomai/sched' shows no changes.
> 
> Does '/proc/xenomai/sched' not change during running, if yes
> I continue debugging my program ?

Hi,

I run with gdb a test program that only create a 1 sec periodic thread that 
rt_timer_spin's during 10ms and waits. 
As above-written, when cpu is assigned _after_ child thread creation,
'ps -ax -0 SCHED | grep <pid>' shows a cpu switch on main thread whereas,
'/proc/xenomai/sched' doesn't.
When cpu is assigned _before_ child thread creation,
'ps -ax -0 SCHED | grep <pid>' shows a cpu switch on main thread,
and '/proc/xenomai/sched' shows no changes for main thread but
the child thread cpu is the assigned one.

Is it right to supposed that, cpu switching is effective according to
'ps -ax -0 SCHED | grep <pid>' even in xenomai context ?
Does '/proc/xenomai/sched' not change during running ?
In this case, how can children threads cpu status be read dynamically like
'ps -ax -0 SCHED | grep <pid>' command for main thread ?

Thanks.
Niry


This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.




^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [Xenomai-help] [Newbie question] threads and task CPU affinity
@ 2007-05-31 15:48 RAKOTOSALAMA, Nirilanto
  0 siblings, 0 replies; 18+ messages in thread
From: RAKOTOSALAMA, Nirilanto @ 2007-05-31 15:48 UTC (permalink / raw)
  To: rpm; +Cc: xenomai, Jan Kiszka

> > Hi,
> > 
> > I'm still blocked on a CPU affinity problem.
> > In order to adapt a set affinity function which is based on
> > posix linux lib :
> > - CPU_AssignPID(uint32 PID, uint32 CPU_id)
> > - the cpu affinity of the caller and all its child threads 
> must be set to CPU_id.
> > 
> > Problems are:
> > Child PIDs must be listed, the only means I found is 
> listing pids using `ls /proc/"Parent pid"/ > temp_file`
> > And each listed pid is sched_setaffinity'ed.
> > I don't know if setting affinity of RT threads from an 
> other thread (parent) using pid works with xenomai.
> > 
> > So, my question is :
> > With xenomai, is recursively cpu affinity setting from a 
> parent thread, a good way of doing ?
> 
> Neither good nor bad. The (i.e. your == Airbus code) library you are
> trying to adapt _wants_ to set the CPU affinity for an entire process
> hierarchy, probably to remain compatible with the behaviour inherited
> from legacy RT environments. Therefore, unless you want to change this
> behaviour at interface specification level (unlikely, 
> right?), you need
> your code to recurse down the process tree too.
>
> > I read switchtest program, and I conclude that in a xenomai 
> and RT perspective, it seems "nicer"
> > to set affinity each threads separately during their init 
> phase before the RT infinite loop.
> 
> There are two questions here:
> 
> Q. whether setting affinity during the init phase is best
> A. yes, since you want to use the regular 
> sched_setaffinity(2) call for
> that, this will switch the caller to secondary mode, and you 
> don't want
> such mode switch to happen during the actual RT processing.
> 
> Q. whether you should opt for flat or process tree-based 
> affinity setup.
> A. it depends on your requirements. IIUC, your specs imply recursive
> setup (because you want to mimic some existing behaviour), so 
> the point
> seems moot here. However, it is always better not to rely on implicit
> affinities; you may end up with a sub-optimal runtime configuration,
> just because the existing process hierarchy may not always be 
> consistent
> with the optimal CPU placement. This said, again, you might have no
> choice here if you need to port some existing library without
> significant changes, especially wrt the higher level code using such
> library.
> 
> > Otherwise, setting affinity after child threads creation 
> > from its parent, may switch them into 
> > secondary mode during their RT loop, and at an unknown moment.
> 
> Actually, only the caller (i.e. the one who calls set_schedaffinity)
> would switch to reenter the Linux kernel properly, in order to submit
> the sched_setaffinity() request. When a thread running in primary mode
> is set a different CPU affinity by another thread using the regular
> Linux kernel service (here, the former thread must be aslept 
> waiting for
> some Xenomai resource), then the new affinity would be enforced only
> when the target thread leaves primary mode. For an immediate migration
> to take place while running in primary mode, you need to ask 
> Xenomai to
> manage it, but there is no direct interface from the POSIX skin to the
> nucleus service performing this magic.
> 
> To sum up, with the Xenomai POSIX interface, you need to call
> sched_setaffinity(2) to set the CPU affinity for both Xenomai and
> regular threads, and if you want to recurse down a process hierarchy,
> you need to make sure that all the targeted children are waiting in a
> plain Linux context, for some master thread to ask for such global
> migration. For instance, you could just sync them all on some init
> barrier which would mark the end of the initialization phase, and the
> latter would include setting the CPU affinity.
> 
> This said, CPU affinity is a task property inherited upon fork, so if
> you manage to have the parent of the process tree setting up the right
> affinity before creating any child thread, you are basically done.
> 
> > Argumentation is important for my internship because I have 
> to port on xenomai a very big RT 
> > posix based application. And I should justify any 
> modifications and prevent potential problems.
> > 
> > Sorry, I don't know if it is clear.
> > 
> > Thanks in advance, Niry.
>
> Philippe.
> 

Thanks for your answer. You exactly sum up my situation (better than myself).
So, if I well undestood, the current implementation of the set affinity 
function for standard linux lib should work for xenomai threads.
So, main changes would take place into libcpu user programs.
I must take care that, in the program that uses this cpu lib, target 
children threads must "wait in linux context".
Should they "wait" sleeping (e.g. on semaphore) or sleeping avoid switching 
to secondary mode ?
Or should they wait on a simple while(!init_finished)?
Does sched_setaffinity from a master thread to a child thread block
master thread until child affinity is set ? In this instance,
sync is easy. If not ???

And if 2nd mode switching cannot be forced, this wait period 
could take a long time, could'nt it?

Niry

This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.




^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [Xenomai-help] [Newbie question] threads and task CPU affinity
@ 2007-05-31 15:48 RAKOTOSALAMA, Nirilanto
  0 siblings, 0 replies; 18+ messages in thread
From: RAKOTOSALAMA, Nirilanto @ 2007-05-31 15:48 UTC (permalink / raw)
  To: Gilles Chanteperdrix; +Cc: xenomai, Jan Kiszka

> > Hi,
> > 
> > I'm still blocked on a CPU affinity problem.
> > In order to adapt a set affinity function which is based on
> > posix linux lib :
> > - CPU_AssignPID(uint32 PID, uint32 CPU_id)
> > - the cpu affinity of the caller and all its child threads 
> must be set to CPU_id.
> > 
> > Problems are:
> > Child PIDs must be listed, the only means I found is 
> listing pids using `ls /proc/"Parent pid"/ > temp_file`
> > And each listed pid is sched_setaffinity'ed.
> > I don't know if setting affinity of RT threads from an 
> other thread (parent) using pid works with xenomai.
> > 
> > So, my question is :
> > With xenomai, is recursively cpu affinity setting from a 
> parent thread, a good way of doing ?
> > I read switchtest program, and I conclude that in a xenomai 
> and RT perspective, it seems "nicer"
> > to set affinity each threads separately during their init 
> phase before the RT infinite loop.
> > Otherwise, setting affinity after child threads creation 
> from its parent, may switch them into 
> > secondary mode during their RT loop, and at an unknown moment.
> > Argumentation is important for my internship because I have 
> to port on xenomai a very big RT 
> > posix based application. And I should justify any 
> modifications and prevent potential problems.
> > 
> > Sorry, I don't know if it is clear.
> 
> I think that it is safe to assume that if the affinity of a thread is
> inherited from the thread that created it with Linux posix 
> library, the
> same will happen with Xenomai.
> 
> Now, if you want to set the affinity of a group of threads after their
> creation, I do not see how to do this without walking through the list
> of threads. If your library has an abstraction for threads, 
> you can keep
> them in a list. It will be useful at process exit time to 
> cleanly cancel
> all threads (this may be useful if you want to detect leaks 
> for instance).
> 
> Note that when talking about scheduling affinity function, we are
> swimming in the undefined, since these functions are not 
> standardized by
> posix.
> 
> But since you are porting a library to Xenomai maybe you can 
> have a look
> at the current implementation of CPU_AssignPID ?
> 
> -- 
>                                                  Gilles Chanteperdrix

Thanks,
Precisly, the current implementation has nothing curious and 
there is no reason it does not work on xenomai but,
in a simple program that just switches the cpu :
Before CPU_assignpid call, 'ps -ax -0 SCHED | grep <pid>'
and '/proc/xenomai/sched' returns the same result (i.e. the current thread runs on the same cpu)
After CPU_assignpid call, 'ps -ax -0 SCHED | grep <pid>' shows that threads cpu has switched
whereas '/proc/xenomai/sched' shows no changes.

Does '/proc/xenomai/sched' not change during running, if yes
I continue debugging my program ?

And unfortunatly, this library does not have a threads abstraction.

CPU_Error CPU_AssignPid(uint32 Pid, CPU_CpuId Cpu)
{
  int mask = 1, i, nbTask;
  int cpu_nb;
  char cmd[SIZE_CMD] ;
  uint32 taskPid;
  FILE * filePid;
  
  cpu_nb = CPU_GetNbCpu();	
  
  if(Cpu > cpu_nb )
    {
      return CPU_INVALID_CPUID;
    }
  for (i=0; i<Cpu; i++) mask = mask *2;
  
  
  sprintf(cmd,"ls /proc/%d/task | wc | awk '{print $1}' > /tmp/nbTask.tmp",Pid);
  system(cmd);
  filePid = fopen("/tmp/nbTask.tmp","r");
  fscanf(filePid,"%d",&nbTask);
  fclose ( filePid );
  
  if ( nbTask == 1)
    {
      if(sched_setaffinity(Pid,sizeof(int), (unsigned long *)&mask) == -1)
	{/* manage error*/}
    }
  else
    {
      sprintf(cmd,"ls /proc/%d/task  > /tmp/listPid.tmp",Pid);
      system(cmd);
      filePid = fopen("/tmp/listPid.tmp","r");
      for ( i =0 ; i < nbTask ; i++ )
	{
	  fscanf(filePid,"%u",&taskPid);
	  if(sched_setaffinity(taskPid, (unsigned long *)&mask) == -1)
	   {/* manage error*/}
      fclose ( filePid );
    }  
  return CPU_OK;
}

This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.




^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [Xenomai-help] [Newbie question] threads and task CPU affinity
@ 2007-05-31 13:08 RAKOTOSALAMA, Nirilanto
  2007-05-31 13:29 ` Gilles Chanteperdrix
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: RAKOTOSALAMA, Nirilanto @ 2007-05-31 13:08 UTC (permalink / raw)
  To: Gilles Chanteperdrix, Jan Kiszka; +Cc: xenomai

Hi,

I'm still blocked on a CPU affinity problem.
In order to adapt a set affinity function which is based on
posix linux lib :
- CPU_AssignPID(uint32 PID, uint32 CPU_id)
- the cpu affinity of the caller and all its child threads must be set to CPU_id.

Problems are:
Child PIDs must be listed, the only means I found is listing pids using `ls /proc/"Parent pid"/ > temp_file`
And each listed pid is sched_setaffinity'ed.
I don't know if setting affinity of RT threads from an other thread (parent) using pid works with xenomai.

So, my question is :
With xenomai, is recursively cpu affinity setting from a parent thread, a good way of doing ?
I read switchtest program, and I conclude that in a xenomai and RT perspective, it seems "nicer"
to set affinity each threads separately during their init phase before the RT infinite loop.
Otherwise, setting affinity after child threads creation from its parent, may switch them into 
secondary mode during their RT loop, and at an unknown moment.
Argumentation is important for my internship because I have to port on xenomai a very big RT 
posix based application. And I should justify any modifications and prevent potential problems.

Sorry, I don't know if it is clear.

Thanks in advance, Niry.

This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.




^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [Xenomai-help] [Newbie question] threads and task CPU affinity
@ 2007-05-23  8:47 RAKOTOSALAMA, Nirilanto
  2007-05-24  7:53 ` Jan Kiszka
  0 siblings, 1 reply; 18+ messages in thread
From: RAKOTOSALAMA, Nirilanto @ 2007-05-23  8:47 UTC (permalink / raw)
  To: jan.kiszka; +Cc: xenomai

> > Hello,
> > 
> > I have some question about CPU affinity with Xenomai 2.3.1.
> > (it is to see if  xenomai support developing for a cpu 
> manager library is feasible)
> 
> What will this library do? (/me just nosy)

In fact, there's simulation programs that run on many different systems (hard + soft),
and to make this applications as portable as possible, they use libraries developed for every
systems (dec alpha, pc, specific cards, linux, unix). And, I search if xenomai could be used
with less re-implementation effort, so the more posix function are developed by xenomai, 
the better it is, and easier it is (for me :p).
So first step is developing this libraries xenomai support (e.g. timer, cpu).
This cpu library should provides "simple" functions like : getting the number of cpu,
setting/getting the cpu affinity for a process passing its pid, protect/un-protect cpu from running
unwanted process.

> > When using rt_task_create, CPU mask can be specified. 
> However, when sched_setaffinity is called 
> > to modify main program affinity, and after, rt_task_create 
> is called without specifying CPU mask,
> > did the child task inherits from the main program affinity ?
> 
> If you don't provide a target CPU (either on creation or via
> /proc/xenomai/affinity), better consider the affinity as unspecified
> (any possible CPU). The target CPU derives from Linux 
> decision where to
> put the thread non-RT boot code on, Xenomai just nails that decision
> down until someone explicitly migrates.
> 
> > 
> > Same question for Posix skin threads ?
> > 
> > Can native task affinity be set other than when creating ? 
> using sdhed_setaffinity ?
> 
> /proc/xenomai/affinity (has global scope) or 
> sched_setaffinity. Xenomai
> shadow threads follow the migration that may took place while in
> secondary mode, and sched_setaffinity comes with such a mode switch.

Thanks, If I have well understood, tasks or threads affinity can be set using /proc/xenomai/affinity
but, I have read that /proc/xenomai/affinity does not exist in xenomai 2.3.1 and xenomai must be patched
(I don't know how because I don't have nor SVN neither internet connection on my xenomai boxes).
So I can use sched_setaffinity, but it make switch to secondary mode. 
Does'nt matter if only threads must be RT and sched_setaffinity is called during a non-rt init phase, does it ?
That means that affinity does'nt depend on running on xenomai or secondary mode ?

BTW, is protecting a CPU with xenomai possible ? 
Does xenomai use /dev/cpuset or an other device ?

> > Can posix skin thread affinity be set using sched_affinity ?
> > 
> > 
> > Thanks in advance.
> > 
> > Niry.
> > 
> 
> Jan
> 
Niry

This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.




^ permalink raw reply	[flat|nested] 18+ messages in thread
* [Xenomai-help] [Newbie question] threads and task CPU affinity
@ 2007-05-22 14:51 RAKOTOSALAMA, Nirilanto
  2007-05-22 16:59 ` Jan Kiszka
  0 siblings, 1 reply; 18+ messages in thread
From: RAKOTOSALAMA, Nirilanto @ 2007-05-22 14:51 UTC (permalink / raw)
  To: xenomai

Hello,

I have some question about CPU affinity with Xenomai 2.3.1.
(it is to see if  xenomai support developing for a cpu manager library is feasible)

When using rt_task_create, CPU mask can be specified. However, when sched_setaffinity is called 
to modify main program affinity, and after, rt_task_create is called without specifying CPU mask,
did the child task inherits from the main program affinity ?

Same question for Posix skin threads ?

Can native task affinity be set other than when creating ? using sdhed_setaffinity ?

Can posix skin thread affinity be set using sched_affinity ?


Thanks in advance.

Niry.

This e-mail is intended only for the above addressee. It may contain privileged information.
If you are not the addressee you must not copy, distribute, disclose or use any of the information in it. 
If you have received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be accessed by someone other than the recipient, for system management and security reasons. This access is controlled under Regulation of security reasons.
This access is controlled under Regulation of Investigatory Powers Act 2000, Lawful Business Practises.




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

end of thread, other threads:[~2007-06-01  8:36 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-24 10:12 [Xenomai-help] [Newbie question] threads and task CPU affinity RAKOTOSALAMA, Nirilanto
2007-05-24 12:07 ` Jan Kiszka
2007-05-24 12:28   ` Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2007-06-01  8:36 RAKOTOSALAMA, Nirilanto
2007-05-31 15:48 RAKOTOSALAMA, Nirilanto
2007-05-31 15:48 RAKOTOSALAMA, Nirilanto
2007-05-31 13:08 RAKOTOSALAMA, Nirilanto
2007-05-31 13:29 ` Gilles Chanteperdrix
2007-05-31 13:32 ` Jan Kiszka
2007-05-31 14:18   ` Gilles Chanteperdrix
2007-05-31 14:28     ` Jan Kiszka
2007-05-31 14:36       ` Gilles Chanteperdrix
2007-05-31 13:36 ` Gilles Chanteperdrix
2007-05-31 14:28 ` Philippe Gerum
2007-05-23  8:47 RAKOTOSALAMA, Nirilanto
2007-05-24  7:53 ` Jan Kiszka
2007-05-22 14:51 RAKOTOSALAMA, Nirilanto
2007-05-22 16:59 ` Jan Kiszka

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.