On Nov 4, 2014, at 9:10 AM, Brice Goglin <brice.gog...@inria.fr> wrote:

>> - pu_children
>> - io_children
>> - misc_children
> 
> OK but what does "pe" stand for? did you mean "pu" to match our PU objects?

I said "pu_children".  Really.  I didn't edit the text above and make it look 
like I didn't typo in the original email.  Really.  Trust me.

:-)

(yes, I meant "pu")

> Unfortunately, children are more than a single field in struct hwloc_obj :)
> 
>  unsigned arity;                       /**< \brief Number of children */
>  struct hwloc_obj **children;          /**< \brief Children, \c children[0 .. 
> arity -1] */
>  struct hwloc_obj *first_child;        /**< \brief First child */
>  struct hwloc_obj *last_child;         /**< \brief Last child */
> 
> I'll review the code to see if we can easily remove first/last_child or so.

My 2 main points:

1. if we're going to have multiple lists, then we might as well call them -- 
and all the related data accompanying them (e.g., first/last_child) what they 
are.  Don't just have "children" and "misc" -- have specific names denoting 
what they are.

2. If we know we're going to have io devices, and we're going to separate them 
out from (pu_)children, then we might as well have a specific list for them.

> So on current x86 machines, we would have this?
> * one level with L1 object with cache attribute "Data"
> * one level with L1 object with cache attribute "Instruction"
> * one level with L2 object with cache attribute "Unified"
> * one level with L3 object with cache attribute "Unified"
> 
> Fortunately, instruction caches are disabled by default (unless somebody
> wants to change that?) so most application will see a single L1 level.

To be honest, I'm not sure what the Right answer is.  It would certainly be 
nice to be able to have a single switch/case to be able to identify all the 
different types of topology items, including the differences between the 
different caches.

Perhaps it would be sufficient to be able to combine the type and the cache 
type together somehow -- e.g., the cache type could be bit-shifted up above the 
type bits, and then you could switch/case on the combined value...?  (waving 
hands furiously...)

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to: 
http://www.cisco.com/web/about/doing_business/legal/cri/

Reply via email to