Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.6.25-git8 /mm/page_alloc.c

Filename:/mm/page_alloc.c
Lines Added:3
Lines Deleted:3
Also changed in: (Previous) 2.6.25-git7  2.6.25-git6  2.6.25-git5  2.6.25-git4  2.6.25-git3  2.6.25 
(Following) 2.6.25-git9  2.6.25-git10  2.6.25-git11  2.6.25-git12  2.6.25-git13  2.6.25-git14 

Location
[  2.6.25-git8
  [  mm
     o  page_alloc.c

Patch

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 402a504..32e796a 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2029,6 +2029,7 @@ static int find_next_best_node(int node, nodemask_t *used_node_mask)
    int n, val;
    int min_val = INT_MAX;
    int best_node = -1;
+   node_to_cpumask_ptr(tmp, 0);
 
    /* Use the local node if we haven't already */
    if (!node_isset(node, *used_node_mask)) {
@@ -2037,7 +2038,6 @@ static int find_next_best_node(int node, nodemask_t *used_node_mask)
    }
 
    for_each_node_state(n, N_HIGH_MEMORY) {
-      cpumask_t tmp;
 
       /* Don't want a node to appear more than once */
       if (node_isset(n, *used_node_mask))
@@ -2050,8 +2050,8 @@ static int find_next_best_node(int node, nodemask_t *used_node_mask)
       val += (n < node);
 
       /* Give preference to headless and unused nodes */
-      tmp = node_to_cpumask(n);
-      if (!cpus_empty(tmp))
+      node_to_cpumask_ptr_next(tmp, n);
+      if (!cpus_empty(*tmp))
          val += PENALTY_FOR_NODE_WITH_CPUS;
 
       /* Slight preference for less loaded node */


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.