aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2012-10-08 19:33:24 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-09 03:22:56 -0400
commit957f822a0ab95e88b146638bad6209bbc315bedd (patch)
tree2e1336ddc1c574f54d582c6b74dcc1d1230482f8 /include/linux/mmzone.h
parenta0c5e813f087dffc0d9b173d2e7d3328b1482fd5 (diff)
mm, numa: reclaim from all nodes within reclaim distance
RECLAIM_DISTANCE represents the distance between nodes at which it is deemed too costly to allocate from; it's preferred to try to reclaim from a local zone before falling back to allocating on a remote node with such a distance. To do this, zone_reclaim_mode is set if the distance between any two nodes on the system is greather than this distance. This, however, ends up causing the page allocator to reclaim from every zone regardless of its affinity. What we really want is to reclaim only from zones that are closer than RECLAIM_DISTANCE. This patch adds a nodemask to each node that represents the set of nodes that are within this distance. During the zone iteration, if the bit for a zone's node is set for the local node, then reclaim is attempted; otherwise, the zone is skipped. [akpm@linux-foundation.org: fix CONFIG_NUMA=n build] Signed-off-by: David Rientjes <rientjes@google.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Minchan Kim <minchan@kernel.org> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index d240efa8f846..a5578871d033 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -709,6 +709,7 @@ typedef struct pglist_data {
709 unsigned long node_spanned_pages; /* total size of physical page 709 unsigned long node_spanned_pages; /* total size of physical page
710 range, including holes */ 710 range, including holes */
711 int node_id; 711 int node_id;
712 nodemask_t reclaim_nodes; /* Nodes allowed to reclaim from */
712 wait_queue_head_t kswapd_wait; 713 wait_queue_head_t kswapd_wait;
713 wait_queue_head_t pfmemalloc_wait; 714 wait_queue_head_t pfmemalloc_wait;
714 struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */ 715 struct task_struct *kswapd; /* Protected by lock_memory_hotplug() */