Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1288945

question about cpusets vs sched_setaffinity()

From Chris Friesen <cbf123@mail.usask.ca>
Newsgroups linux.kernel
Subject question about cpusets vs sched_setaffinity()
Date 2015-12-10 22:40 +0100
Message-ID <qEh6q-3f7-37@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

I've got a question about the interaction between cpusets and sched_setaffinity().

If I put a task into a cpuset and then call sched_setaffinity() on it, it will 
be affined to the intersection of the two sets of cpus.  (Those specified on the 
set, and those specified in the syscall.)

However, if I then change the cpus in the cpuset the process affinity will 
simply be overwritten by the new cpuset affinity.  It does not seem to take into 
account any restrictions from the original sched_setaffinity() call.

Wouldn't it make more sense to affine the process to the intersection between 
the new set of cpus from the cpuset, and the current process affinity?  That way 
if I explicitly masked out certain CPUs in the original sched_setaffinity() call 
then they would remain masked out regardless of changes to the set of cpus 
assigned to the cpuset.

Thanks,
Chris

PS: Not subscribed to the list, please CC me on replies.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

question about cpusets vs sched_setaffinity() Chris Friesen <cbf123@mail.usask.ca> - 2015-12-10 22:40 +0100
  Re: question about cpusets vs sched_setaffinity() Jason Baron <jbaron@akamai.com> - 2015-12-11 23:20 +0100

csiph-web