Open MPI logo

Hardware Locality Development Mailing List Archives

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

Subject: Re: [hwloc-devel] memory size attributes
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-01-26 15:14:33


On Jan 26, 2010, at 10:09 AM, Brice Goglin wrote:

> * should we enforce the ordering of pages size+count structures ? I am
> sorting by page size for now

Seems like a neighborly thing to do. If it's not hard, I say keep that functionality.

> * how is the pages array terminated ? size = 0 ? or both size and count
> = 0 ? if some OS fail to give the size of normal pages or huge pages, we
> might have count !=0 while size = 0 in some cases.
> * or should we add pages_count to the memory strcuture to explictly
> store the length of the pages array ?

If there's a question about what some OS's may do (e.g., report 0), then I'd be in favor of explicitly storing the pages_count. Who knows; someone may need to allocate some resources based on the length of that array (E.g., a GUI showing all the different page sizes); so if that length is available without the application needing to traverse the array just to count the length, that's another neighborly thing to do.

(for the purposes of this email, "neighborly" = "nice to do and might be useful to some people, but not strictly required and I wouldn't fight if we didn't do it")

-- 
Jeff Squyres
jsquyres_at_[hidden]