libhsakmt: correct number of NUMA nodes calculation
numa_max_node() return the highest node number available on the current system, number of NUMA nodes should be numa_max_node() + 1. Change-Id: I20a6c17af071e73e853cb5ea6d0304c8aca52681 Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Этот коммит содержится в:
+1
-1
@@ -1468,7 +1468,7 @@ static int bind_mem_to_numa(uint32_t node_id, void *mem,
|
||||
if (numa_available() == -1)
|
||||
return 0;
|
||||
|
||||
num_node = numa_max_node();
|
||||
num_node = numa_max_node() + 1;
|
||||
|
||||
/* Ignore binding requests to invalid nodes IDs */
|
||||
if (node_id >= (unsigned)num_node) {
|
||||
|
||||
Ссылка в новой задаче
Block a user