aboutsummaryrefslogtreecommitdiffstats
path: root/mm/page_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r--mm/page_alloc.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 6c7e3bd93a85..9ad6866ac49c 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3032,7 +3032,7 @@ int numa_zonelist_order_handler(ctl_table *table, int write,
3032 user_zonelist_order = oldval; 3032 user_zonelist_order = oldval;
3033 } else if (oldval != user_zonelist_order) { 3033 } else if (oldval != user_zonelist_order) {
3034 mutex_lock(&zonelists_mutex); 3034 mutex_lock(&zonelists_mutex);
3035 build_all_zonelists(NULL); 3035 build_all_zonelists(NULL, NULL);
3036 mutex_unlock(&zonelists_mutex); 3036 mutex_unlock(&zonelists_mutex);
3037 } 3037 }
3038 } 3038 }
@@ -3415,10 +3415,17 @@ static __init_refok int __build_all_zonelists(void *data)
3415{ 3415{
3416 int nid; 3416 int nid;
3417 int cpu; 3417 int cpu;
3418 pg_data_t *self = data;
3418 3419
3419#ifdef CONFIG_NUMA 3420#ifdef CONFIG_NUMA
3420 memset(node_load, 0, sizeof(node_load)); 3421 memset(node_load, 0, sizeof(node_load));
3421#endif 3422#endif
3423
3424 if (self && !node_online(self->node_id)) {
3425 build_zonelists(self);
3426 build_zonelist_cache(self);
3427 }
3428
3422 for_each_online_node(nid) { 3429 for_each_online_node(nid) {
3423 pg_data_t *pgdat = NODE_DATA(nid); 3430 pg_data_t *pgdat = NODE_DATA(nid);
3424 3431
@@ -3463,7 +3470,7 @@ static __init_refok int __build_all_zonelists(void *data)
3463 * Called with zonelists_mutex held always 3470 * Called with zonelists_mutex held always
3464 * unless system_state == SYSTEM_BOOTING. 3471 * unless system_state == SYSTEM_BOOTING.
3465 */ 3472 */
3466void __ref build_all_zonelists(void *data) 3473void __ref build_all_zonelists(pg_data_t *pgdat, struct zone *zone)
3467{ 3474{
3468 set_zonelist_order(); 3475 set_zonelist_order();
3469 3476
@@ -3475,10 +3482,10 @@ void __ref build_all_zonelists(void *data)
3475 /* we have to stop all cpus to guarantee there is no user 3482 /* we have to stop all cpus to guarantee there is no user
3476 of zonelist */ 3483 of zonelist */
3477#ifdef CONFIG_MEMORY_HOTPLUG 3484#ifdef CONFIG_MEMORY_HOTPLUG
3478 if (data) 3485 if (zone)
3479 setup_zone_pageset((struct zone *)data); 3486 setup_zone_pageset(zone);
3480#endif 3487#endif
3481 stop_machine(__build_all_zonelists, NULL, NULL); 3488 stop_machine(__build_all_zonelists, pgdat, NULL);
3482 /* cpuset refresh routine should be here */ 3489 /* cpuset refresh routine should be here */
3483 } 3490 }
3484 vm_total_pages = nr_free_pagecache_pages(); 3491 vm_total_pages = nr_free_pagecache_pages();