Skip to content

Commit

Permalink
windows: add new Relation types
Browse files Browse the repository at this point in the history
Not used yet.

TODO specify the Windows release where they will be added for real.

Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
  • Loading branch information
bgoglin committed Apr 17, 2023
1 parent af43952 commit 6398f06
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/hwloc.m4
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ EOF])
CACHE_DESCRIPTOR,
LOGICAL_PROCESSOR_RELATIONSHIP,
RelationProcessorPackage,
RelationProcessorDie,
GROUP_AFFINITY,
PROCESSOR_RELATIONSHIP,
NUMA_NODE_RELATIONSHIP,
Expand Down
9 changes: 9 additions & 0 deletions hwloc/topology-windows.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP {
RelationCache,
RelationProcessorPackage,
RelationGroup,
RelationProcessorDie,
RelationNumaNodeEx, /* only used to *request* extended numa info only, but included in RelationAll, never returned on output */
RelationProcessorModule,
RelationAll = 0xffff
} LOGICAL_PROCESSOR_RELATIONSHIP;
#else /* HAVE_LOGICAL_PROCESSOR_RELATIONSHIP */
Expand All @@ -64,6 +67,11 @@ typedef enum _LOGICAL_PROCESSOR_RELATIONSHIP {
# define RelationGroup 4
# define RelationAll 0xffff
# endif /* HAVE_RELATIONPROCESSORPACKAGE */
# ifndef HAVE_RELATIONPROCESSORDIE
# define RelationProcessorDie 5
# define RelationNumaNodeEx 6
# define RelationProcessorModule 7
# endif
#endif /* HAVE_LOGICAL_PROCESSOR_RELATIONSHIP */

#ifndef HAVE_GROUP_AFFINITY
Expand Down Expand Up @@ -1062,6 +1070,7 @@ hwloc_look_windows(struct hwloc_backend *backend, struct hwloc_disc_status *dsta

id = HWLOC_UNKNOWN_INDEX;
switch (procInfo->Relationship) {
case RelationNumaNodeEx: /* only used on input anyway */
case RelationNumaNode:
type = HWLOC_OBJ_NUMANODE;
/* Starting with Windows 11 and Server 2022, the GroupCount field is valid and >=1
Expand Down

0 comments on commit 6398f06

Please sign in to comment.