Export (0) Print
Expand All
Expand Minimize

KeQueryNodeActiveAffinity routine

The KeQueryNodeActiveAffinity routine gets the current processor affinity of a specified node in a multiprocessor system that has a non-uniform memory access (NUMA) architecture.

Syntax


VOID KeQueryNodeActiveAffinity(
  _In_       USHORT NodeNumber,
  _Out_opt_  PGROUP_AFFINITY Affinity,
  _Out_opt_  PUSHORT Count
);

Parameters

NodeNumber [in]

The node number. If a multiprocessor system contains n nodes, the nodes are numbered from 0 to n-1. To obtain the highest node number (n-1) in the system, call the KeQueryHighestNodeNumber routine.

Affinity [out, optional]

A pointer to a caller-allocated buffer into which the routine writes a GROUP_AFFINITY structure. This structure contains the group number of the group that contains the node that is identified by NodeNumber, and an affinity mask that indicates which logical processors in the node are active. You can set this parameter to NULL if you do not need this information.

Count [out, optional]

A pointer to a location into which the routine writes the number of active processors that are represented in the node affinity mask that is pointed to by Affinity. You can set this parameter to NULL if you do not need this information.

Return value

None

Remarks

The caller-allocated buffer that is pointed to by the Affinity parameter must be large enough to contain a GROUP_AFFINITY structure. The Mask member of this structure contains an affinity mask that indicates which processors are active. If a processor is active, the corresponding bit in the mask is one. All other bits are zero.

In a NUMA multiprocessor architecture, a node is a collection of processors that share fast access to a region of memory. Memory access is non-uniform because a processor can access the memory in its node faster than it can access the memory in other nodes.

The number of processors in a node cannot exceed the number of bits in the affinity mask in the structure that is pointed to by Affinity. The affinity mask also determines the maximum number of processors in a group.

If, during system initialization, Windows encounters a NUMA hardware node that contains more logical processors than will fit into a group, Windows splits the node into smaller, logical nodes. Each of these nodes does not exceed the maximum group size. The NodeNumber parameter identifies a logical node. To obtain the maximum number of processors per group, call the KeQueryMaximumProcessorCountEx routine.

Requirements

Version

Available in Windows 7 and later versions of Windows.

Header

Wdm.h (include Wdm.h, Ntddk.h, or Ntifs.h)

Library

Ntoskrnl.lib

IRQL

Any level

See also

GROUP_AFFINITY
KeQueryHighestNodeNumber
KeQueryMaximumProcessorCountEx

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft