aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@engr.sgi.com>2006-02-01 03:05:26 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 08:53:14 -0800
commit42c722d4cb4022e56ff200f3f5a58c0dfd7edac6 (patch)
treea954fe12587951c01c61c0fc1ad2219a74adbbcb /mm
parent8928862398fef04a137e5673ac5fa9e797960c87 (diff)
downloadkernel_samsung_smdk4412-42c722d4cb4022e56ff200f3f5a58c0dfd7edac6.zip
kernel_samsung_smdk4412-42c722d4cb4022e56ff200f3f5a58c0dfd7edac6.tar.gz
kernel_samsung_smdk4412-42c722d4cb4022e56ff200f3f5a58c0dfd7edac6.tar.bz2
[PATCH] zone_reclaim: reclaim on memory only node support
Zone reclaim is usually only run on the local node. Headless nodes do not have any local processors. This patch checks for headless nodes and performs zone reclaim on them. Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmscan.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 465bfa5..0ca6007 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1599,17 +1599,23 @@ int zone_reclaim(struct zone *zone, gfp_t gfp_mask, unsigned int order)
struct task_struct *p = current;
struct reclaim_state reclaim_state;
struct scan_control sc;
+ cpumask_t mask;
+ int node_id;
if (time_before(jiffies,
zone->last_unsuccessful_zone_reclaim + ZONE_RECLAIM_INTERVAL))
return 0;
if (!(gfp_mask & __GFP_WAIT) ||
- zone->zone_pgdat->node_id != numa_node_id() ||
zone->all_unreclaimable ||
atomic_read(&zone->reclaim_in_progress) > 0)
return 0;
+ node_id = zone->zone_pgdat->node_id;
+ mask = node_to_cpumask(node_id);
+ if (!cpus_empty(mask) && node_id != numa_node_id())
+ return 0;
+
sc.may_writepage = 0;
sc.may_swap = 0;
sc.nr_scanned = 0;