Re: [patch] mm, numa: reclaim from all nodes within reclaim distance

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 18 Sep 2012 00:03:57 -0700 (PDT)
David Rientjes <rientjes@xxxxxxxxxx> wrote:

> 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.

zone_reclaim_mode isn't an lval if CONFIG_NUMA=n:

--- a/mm/page_alloc.c~mm-numa-reclaim-from-all-nodes-within-reclaim-distance-fix
+++ a/mm/page_alloc.c
@@ -4561,7 +4561,9 @@ void __paginginit free_area_init_node(in
 	for_each_online_node(i)
 		if (node_distance(nid, i) <= RECLAIM_DISTANCE) {
 			node_set(i, pgdat->reclaim_nodes);
+#ifdef CONFIG_NUMA
 			zone_reclaim_mode = 1;
+#endif
 		}
 	calculate_node_totalpages(pgdat, zones_size, zholes_size);
 

That may not be a very good fix though - can we get all this NUMAy code
out of a non-NUMA-specific code site?

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]