|
@@ -161,7 +161,9 @@ static unsigned long __meminitdata dma_reserve;
|
|
|
|
|
|
#if MAX_NUMNODES > 1
|
|
#if MAX_NUMNODES > 1
|
|
int nr_node_ids __read_mostly = MAX_NUMNODES;
|
|
int nr_node_ids __read_mostly = MAX_NUMNODES;
|
|
|
|
+int nr_online_nodes __read_mostly = 1;
|
|
EXPORT_SYMBOL(nr_node_ids);
|
|
EXPORT_SYMBOL(nr_node_ids);
|
|
|
|
+EXPORT_SYMBOL(nr_online_nodes);
|
|
#endif
|
|
#endif
|
|
|
|
|
|
int page_group_by_mobility_disabled __read_mostly;
|
|
int page_group_by_mobility_disabled __read_mostly;
|
|
@@ -1466,7 +1468,7 @@ this_zone_full:
|
|
if (NUMA_BUILD)
|
|
if (NUMA_BUILD)
|
|
zlc_mark_zone_full(zonelist, z);
|
|
zlc_mark_zone_full(zonelist, z);
|
|
try_next_zone:
|
|
try_next_zone:
|
|
- if (NUMA_BUILD && !did_zlc_setup && num_online_nodes() > 1) {
|
|
|
|
|
|
+ if (NUMA_BUILD && !did_zlc_setup && nr_online_nodes > 1) {
|
|
/*
|
|
/*
|
|
* we do zlc_setup after the first zone is tried but only
|
|
* we do zlc_setup after the first zone is tried but only
|
|
* if there are multiple nodes make it worthwhile
|
|
* if there are multiple nodes make it worthwhile
|
|
@@ -2265,7 +2267,7 @@ int numa_zonelist_order_handler(ctl_table *table, int write,
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-#define MAX_NODE_LOAD (num_online_nodes())
|
|
|
|
|
|
+#define MAX_NODE_LOAD (nr_online_nodes)
|
|
static int node_load[MAX_NUMNODES];
|
|
static int node_load[MAX_NUMNODES];
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -2474,7 +2476,7 @@ static void build_zonelists(pg_data_t *pgdat)
|
|
|
|
|
|
/* NUMA-aware ordering of nodes */
|
|
/* NUMA-aware ordering of nodes */
|
|
local_node = pgdat->node_id;
|
|
local_node = pgdat->node_id;
|
|
- load = num_online_nodes();
|
|
|
|
|
|
+ load = nr_online_nodes;
|
|
prev_node = local_node;
|
|
prev_node = local_node;
|
|
nodes_clear(used_mask);
|
|
nodes_clear(used_mask);
|
|
|
|
|
|
@@ -2625,7 +2627,7 @@ void build_all_zonelists(void)
|
|
|
|
|
|
printk("Built %i zonelists in %s order, mobility grouping %s. "
|
|
printk("Built %i zonelists in %s order, mobility grouping %s. "
|
|
"Total pages: %ld\n",
|
|
"Total pages: %ld\n",
|
|
- num_online_nodes(),
|
|
|
|
|
|
+ nr_online_nodes,
|
|
zonelist_order_name[current_zonelist_order],
|
|
zonelist_order_name[current_zonelist_order],
|
|
page_group_by_mobility_disabled ? "off" : "on",
|
|
page_group_by_mobility_disabled ? "off" : "on",
|
|
vm_total_pages);
|
|
vm_total_pages);
|