Brice Goglin, le Sat 30 Jan 2010 15:47:26 +0100, a écrit :
> Samuel Thibault wrote:
> > Brice Goglin, le Sat 30 Jan 2010 15:32:51 +0100, a écrit :
> >> I still don't see much difference. In #12, you get_cpubind(pid=0) and
> >> use the resulting cpuset to restrict our topology. In #21, you
> >> get_cpubind(another pid) and apply the cpuset to restrict our topology
> >> as well.
> > No: the administrative restriction cpuset is not the same as the current
> > cpuset binding of the target process.
> Neither #12 nor #21 talks about adminstrative restriction...
#21 implicitly does: "what cpuset they're bound to" is just an example.
A configuration function hwloc_topology_set_pid(topology, pid) would
mean that the discovery has to be done from the view of the given pid,
and thus the allowed_cpuset should be according to that view, thus
> So we'd need this ?
> 1) hwloc_topology_from_cpu/membind(pid) (or cpuset as argument) =>
> restrict topology to given cpu/membind
> 2) hwloc_topology_get_from_pid(pid) reads both cpu/membind and
> administrative restrictions from another process instead of current process
No need for these, they'd be contained in the hwloc_topology_set_pid()
configuration function, which is a more powerful way to do it.