]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] for_each_online_pgdat: remove sorting pgdat
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Mon, 27 Mar 2006 09:16:00 +0000 (01:16 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 27 Mar 2006 16:44:48 +0000 (08:44 -0800)
Because pgdat_list was linked to pgdat_list in *reverse* order, (By default)
some of arch has to sort it by themselves.

for_each_pgdat has gone..for_each_online_pgdat() uses node_online_map, which
doesn't need to be sorted.

This patch removes codes for sorting pgdat.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/mm/discontig.c
arch/ia64/mm/discontig.c
arch/m32r/mm/discontig.c

index c4af9638dbfa133adacfabeb7b112167cbe63baa..c3f3ae95e22db20546fae5c538bc23ea762ae1fc 100644 (file)
@@ -352,17 +352,6 @@ void __init zone_sizes_init(void)
 {
        int nid;
 
-       /*
-        * Insert nodes into pgdat_list backward so they appear in order.
-        * Clobber node 0's links and NULL out pgdat_list before starting.
-        */
-       pgdat_list = NULL;
-       for (nid = MAX_NUMNODES - 1; nid >= 0; nid--) {
-               if (!node_online(nid))
-                       continue;
-               NODE_DATA(nid)->pgdat_next = pgdat_list;
-               pgdat_list = NODE_DATA(nid);
-       }
 
        for_each_online_node(nid) {
                unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
index 384f1d7dce961d71b52ccbb21667afde5c5f8a01..ec9eeb89975d6c3c4952bdea4ca4511e12e465a5 100644 (file)
@@ -378,31 +378,6 @@ static void __init *memory_less_node_alloc(int nid, unsigned long pernodesize)
        return ptr;
 }
 
-/**
- * pgdat_insert - insert the pgdat into global pgdat_list
- * @pgdat: the pgdat for a node.
- */
-static void __init pgdat_insert(pg_data_t *pgdat)
-{
-       pg_data_t *prev = NULL, *next;
-
-       for_each_online_pgdat(next)
-               if (pgdat->node_id < next->node_id)
-                       break;
-               else
-                       prev = next;
-
-       if (prev) {
-               prev->pgdat_next = pgdat;
-               pgdat->pgdat_next = next;
-       } else {
-               pgdat->pgdat_next = pgdat_list;
-               pgdat_list = pgdat;
-       }
-
-       return;
-}
-
 /**
  * memory_less_nodes - allocate and initialize CPU only nodes pernode
  *     information.
@@ -745,11 +720,5 @@ void __init paging_init(void)
                                    pfn_offset, zholes_size);
        }
 
-       /*
-        * Make memory less nodes become a member of the known nodes.
-        */
-       for_each_node_mask(node, memory_less_mask)
-               pgdat_insert(mem_data[node].pgdat);
-
        zero_page_memmap_ptr = virt_to_page(ia64_imva(empty_zero_page));
 }
index 08e727955555ca13b8b8eafcc5272db2edffcb8f..70c8528a0ad5c106c530b158e44c7d1b8eea8c23 100644 (file)
@@ -137,12 +137,6 @@ unsigned long __init zone_sizes_init(void)
        int nid, i;
        mem_prof_t *mp;
 
-       pgdat_list = NULL;
-       for (nid = num_online_nodes() - 1 ; nid >= 0 ; nid--) {
-               NODE_DATA(nid)->pgdat_next = pgdat_list;
-               pgdat_list = NODE_DATA(nid);
-       }
-
        for_each_online_node(nid) {
                mp = &mem_prof[nid];
                for (i = 0 ; i < MAX_NR_ZONES ; i++) {