]> err.no Git - linux-2.6/commitdiff
Memoryless nodes: Uncached allocator updates
authorChristoph Lameter <clameter@sgi.com>
Tue, 16 Oct 2007 08:25:33 +0000 (01:25 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:42:58 +0000 (09:42 -0700)
The checks for node_online in the uncached allocator are made to make sure
that memory is available on these nodes.  Thus switch all the checks to use
N_HIGH_MEMORY and to N_ONLINE.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Jes Sorensen <jes@sgi.com>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Bob Picco <bob.picco@hp.com>
Cc: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Mel Gorman <mel@skynet.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/ia64/kernel/uncached.c
drivers/char/mspec.c

index c58e933694d5d2724744f2d19d1c05dc1e993b2b..a7be4f203420ddfd82629fe5308d445911f236ba 100644 (file)
@@ -196,7 +196,7 @@ unsigned long uncached_alloc_page(int starting_nid)
        nid = starting_nid;
 
        do {
-               if (!node_online(nid))
+               if (!node_state(nid, N_HIGH_MEMORY))
                        continue;
                uc_pool = &uncached_pools[nid];
                if (uc_pool->pool == NULL)
@@ -268,7 +268,7 @@ static int __init uncached_init(void)
 {
        int nid;
 
-       for_each_online_node(nid) {
+       for_each_node_state(nid, N_ONLINE) {
                uncached_pools[nid].pool = gen_pool_create(PAGE_SHIFT, nid);
                mutex_init(&uncached_pools[nid].add_chunk_mutex);
        }
index 04ac155d3a0794cf3d7958722e1532e198aa2c52..82f2e27dca7d17ac42072adbd56cb52a175d551a 100644 (file)
@@ -362,7 +362,7 @@ mspec_init(void)
                is_sn2 = 1;
                if (is_shub2()) {
                        ret = -ENOMEM;
-                       for_each_online_node(nid) {
+                       for_each_node_state(nid, N_ONLINE) {
                                int actual_nid;
                                int nasid;
                                unsigned long phys;