Search code examples
windowskerneldrivernuma

What is the driver equivalent of GetNumaProcessorNodeEx?


I am currently trying to hook up some kernel threads in a driver to specific NUMA nodes. To do so, I need to query the NUMA node of individual processors.

Unfortunately, GetNumaProcessorNodeEx is not available from a driver (it requires Windows.h). What is the driver equivalent of that function?


Solution

  • You can call KeQueryLogicalProcessorRelationship and request the RelationNumaNode. This will get you the affinities for every NUMA node in the system.