提交 42c722d4 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

[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: NChristoph Lameter <clameter@sgi.com>
Signed-off-by: NAndy Whitcroft <apw@shadowen.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 89288623
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册