开发者

How to use GetNumaProximityNode (Win7+)?

Starting with Win7/Server2008R2 the GetNumaProximityNode(Ex) function is available. It should help retrieve the distance between NUMA nodes, but I can't understand from the documentation (http://msdn.microsoft.com/en-us/library/ms683206(VS.85).aspx) how it's supposed to work. It says that you give it a distance, and it returns the corresponding node (if there is any).

Reading some code from the Linux kernel and some HP APIC documentation I saw that distances are expressed in integers multiples of 10 (the distance to self is 10), but it can also bee something like 18 (not exactly two times slower). But I still can't figure out how to compute the distance between two nodes using the W开发者_开发问答indows API (under Linux libnuma has a 'distance' function that does this).

Does anyone know how to use this function?


I have found a solution for Windows (though not tested yet). The distances can be found in the SLIT - System Locality Information Table - an extension provided by OEMs and available through ACPI. It contains a N_CPU x N_CPU matrix that describes the distances ([1][3] is the distance between nodes 1 and 3; [Y][Y] is always 10; below 10 is invalid).

Windows Vista+ has the method GetSystemFirmwareTable that can be used to retrieve this table (it seems that under XP it can be retrieved from the Registry, but it's more difficult).
The structure of this table can be found in the ACPICA package (http://www.acpica.org).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜