aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/mmzone.h13
-rw-r--r--mm/page_alloc.c5
2 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index a23923ba8263..28601fdfcdb2 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -717,6 +717,19 @@ typedef struct pglist_data {
717 struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */ 717 struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */
718 int kswapd_max_order; 718 int kswapd_max_order;
719 enum zone_type classzone_idx; 719 enum zone_type classzone_idx;
720#ifdef CONFIG_NUMA_BALANCING
721 /*
722 * Lock serializing the per destination node AutoNUMA memory
723 * migration rate limiting data.
724 */
725 spinlock_t numabalancing_migrate_lock;
726
727 /* Rate limiting time interval */
728 unsigned long numabalancing_migrate_next_window;
729
730 /* Number of pages migrated during the rate limiting time interval */
731 unsigned long numabalancing_migrate_nr_pages;
732#endif
720} pg_data_t; 733} pg_data_t;
721 734
722#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages) 735#define node_present_pages(nid) (NODE_DATA(nid)->node_present_pages)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5953dc2d196f..ef025e20dbee 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4449,6 +4449,11 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat,
4449 int ret; 4449 int ret;
4450 4450
4451 pgdat_resize_init(pgdat); 4451 pgdat_resize_init(pgdat);
4452#ifdef CONFIG_NUMA_BALANCING
4453 spin_lock_init(&pgdat->numabalancing_migrate_lock);
4454 pgdat->numabalancing_migrate_nr_pages = 0;
4455 pgdat->numabalancing_migrate_next_window = jiffies;
4456#endif
4452 init_waitqueue_head(&pgdat->kswapd_wait); 4457 init_waitqueue_head(&pgdat->kswapd_wait);
4453 init_waitqueue_head(&pgdat->pfmemalloc_wait); 4458 init_waitqueue_head(&pgdat->pfmemalloc_wait);
4454 pgdat_page_cgroup_init(pgdat); 4459 pgdat_page_cgroup_init(pgdat);