I specified a cpuset X with core 2-11, and taskset --cpu-list 2.
It seems like if I run a process with taskset nested with cpuset X, then sched_getaffinity() only sees core #2 available.
My question is that is there a way to achieve the followings:
- default all threads in a process to 1 core, AND
- the process is "protected" by cpuset (so that no other processes will use the set of cores specified), AND
- I can still set the cpu affinities for some threads programmatically (I know how this can be done with pthread_attr_setaffinity_np())?
Thanks in advance.
I specified a cpuset X with core 2-11, and taskset --cpu-list 2.
It seems like if I run a process with taskset nested with cpuset X, then sched_getaffinity() only sees core #2 available.
My question is that is there a way to achieve the followings:
- default all threads in a process to 1 core, AND
- the process is "protected" by cpuset (so that no other processes will use the set of cores specified), AND
- I can still set the cpu affinities for some threads programmatically (I know how this can be done with pthread_attr_setaffinity_np())?
Thanks in advance.
0 commentaires:
Enregistrer un commentaire