Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] More memory binding questions
From: Samuel Thibault (samuel.thibault_at_[hidden])
Date: 2011-01-05 17:51:06


Jeff Squyres, le Wed 05 Jan 2011 23:14:58 +0100, a écrit :
> On Jan 5, 2011, at 11:20 AM, Samuel Thibault wrote:
> >>> “When retrieving the binding of a memory range, this flag checks
> >>> whether all its pages actually have the same binding. If the flag is
> >>> not given, the binding of each page will be accumulated.”
> >
> > The memory nodes set to which pages are bound. For now it's only
> > implemented on windows and the policy is only returned as being
> > MEMBIND_BIND (because there is no smarter policy on windows actually).
> > I'm not sure which policy we will want to return when several subareas
> > have differing policies.
>
> Forgive me, I still don't understand. Here's a guess at what happens -- is this anywhere close to correct?
>
> When STRICT is passed: if all pages have the same policy, the nodeset is cleared and then the corresponding numa nodes are set, and the policy output param is set to the correct value. If all pages don't have the same policy, ... what happens? Is an error returned and the nodeset value is untouched / undefined?

EXDEV, and untouched, yes.

> When STRICT is not passed: the nodeset is cleared and then the corresponding numa nodes are set, regardless of whether all pages have the same policy or not.

More precisely, if there are two pages that reside on two different
numa nodes, these two nodes will be set in the bitmap.

> If all nodes have the same policy, the policy output param is set to that value. If they don't have the same value, what value is set in the policy output param?

That's precisely what I said above: I'm not sure what we want to return
in that case. For now it's easy because it's only implemented on
windows, which only has one policy...

> Also, does your middle statement mean that hwloc_get_membind will return ENOSYS on all systems except Windows?

Yes.

> >>>> What is the purpose of the IN flags argument?
> >>>
> >>> Answered above :) At least the STRICT flag.
> >>
> >> Is the STRICT flag the only flag that is allowable in all the _get_ functions?
> >
> > THREAD/PROCESS are also allowed in the hwloc_get_membind() function
> > case. Migrate and nocpubind don't make sense.
>
> I keep getting mixed up because both the flags and the policies are HWLOC_MEMBIND_<foo> -- there's no name delineation between the policies and the flags.

Ah. Too bad it's a bit late to rename them for 1.1 :/

> >> If other flags are passed, are they ignored or do they cause an error?
> >
> > IIRC they are just ignored for now. We could easily make them cause an
> > error.
>
> I don't think I have an opinion either way; I was just looking for clarification.

Ok. I guess returning an error would make it clearer.

Samuel