[PATCH 1 of 5] Correct numa_max_node() use of broken numa_num_configured_nodes()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Author: Tim Pepper <lnxninja@xxxxxxxxxxxxxxxxxx>
Date:   Mon Sep 20 13:54:49 2010 -0700

    Correct numa_max_node() use of broken numa_num_configured_nodes()
    
    numa_max_node() is documented to return the highest numbered node,
    but it does so via the currently broken numa_num_configured_nodes()
    function (which will be fixed in subsequent patch).  Without
    this patch, numa_max_node() will return incorrect information
    when numa_num_configured_nodes() is fixed.  With this patch
    numa_max_node() will return correct information both before and after
    numa_num_configured_nodes() is fixed.
    
    Signed-off-by: Tim Pepper <lnxninja@xxxxxxxxxxxxxxxxxx>
---
 libnuma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libnuma.c b/libnuma.c
index 7ed50a0..5d9a576 100644
--- a/libnuma.c
+++ b/libnuma.c
@@ -619,7 +619,7 @@ numa_num_task_cpus(void)
 int
 numa_max_node(void)
 {
-	return numa_num_configured_nodes()-1;
+	return maxconfigurednode;
 }
 
 make_internal_alias(numa_max_node);
--
To unsubscribe from this list: send the line "unsubscribe linux-numa" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]     [Devices]

  Powered by Linux