diff options
author | Mel Gorman <mel@csn.ul.ie> | 2008-09-13 05:33:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-13 17:41:52 -0400 |
commit | 5bead2a0680687b9576d57c177988e8aa082b922 (patch) | |
tree | 25d8db69bd7b353131f9a5260d024d3018eeffa0 /mm | |
parent | 7e96445533ac3f4f7964646a202ff3620602fab4 (diff) |
mm: mark the correct zone as full when scanning zonelists
The iterator for_each_zone_zonelist() uses a struct zoneref *z cursor when
scanning zonelists to keep track of where in the zonelist it is. The
zoneref that is returned corresponds to the the next zone that is to be
scanned, not the current one. It was intended to be treated as an opaque
list.
When the page allocator is scanning a zonelist, it marks elements in the
zonelist corresponding to zones that are temporarily full. As the
zonelist is being updated, it uses the cursor here;
if (NUMA_BUILD)
zlc_mark_zone_full(zonelist, z);
This is intended to prevent rescanning in the near future but the zoneref
cursor does not correspond to the zone that has been found to be full.
This is an easy misunderstanding to make so this patch corrects the
problem by changing zoneref cursor to be the current zone being scanned
instead of the next one.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmzone.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/mmzone.c b/mm/mmzone.c index 486ed595ee6f..16ce8b955dcf 100644 --- a/mm/mmzone.c +++ b/mm/mmzone.c | |||
@@ -69,6 +69,6 @@ struct zoneref *next_zones_zonelist(struct zoneref *z, | |||
69 | (z->zone && !zref_in_nodemask(z, nodes))) | 69 | (z->zone && !zref_in_nodemask(z, nodes))) |
70 | z++; | 70 | z++; |
71 | 71 | ||
72 | *zone = zonelist_zone(z++); | 72 | *zone = zonelist_zone(z); |
73 | return z; | 73 | return z; |
74 | } | 74 | } |