Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] towards PLPA-like API in 1.0
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2009-11-11 20:46:25


Brice Goglin, le Thu 05 Nov 2009 17:22:15 +0100, a écrit :
> + int hwloc_plpa_sched_getaffinity(pid_t pid, hwloc_cpuset_t cpuset);
>
> It's just a hwloc_get_cpubind(), but we don't have it since it would not
> be supported on all OS. But I think we should add it anyway.

Being discussed in another thread.

> * Then we have all count-spec related API, which lets you look for
> information about all processors, or all online ones, or all offline ones.
>
> If people are really interested with offline CPUs, they can look at the
> get_offline_cpuset below. There is no topology information about offline
> CPUs on Linux anyway,

And at least on some other OSes as well, but not on Solaris for
instance.

> + hwloc_cpuset_t hwloc_topology_get_offline_cpuset(hwloc_topology_t topology);
>
> Returns a CPU set of existing CPUs that are offline, disabled by
> administrator, or unavailable to this process if we're restricting the
> topology to the process origin binding for instance. I am not sure we
> actually need to distinguish all these cases.

Mmm, I think there's one more thing that is actually more precise in
some way: "the CPUs that we don't provide topology objects for": some
OSes don't expose unauthorized CPUs even if they are online. It would
thus also include CPUs which have explicitly been ignored because
HWLOC_TOPOLOGY_FLAG_WHOLE_SYSTEM is not set.

I think it can be useful to provide the cpuset of allowed cpus. One
could imagine a tool that negociates with the administrator tools
which cpus to be added/removed from the allowed set, knowing the whole
topology and which CPUs are allowed would be useful. Maybe powering
up/down could be involved too, thus the offline mask too. The current
binding is already available from hwloc_get_cpubind.

Actually, that gives me the idea that it'd be probably nice to somehow
show that in the graphical lstopo :)

Samuel