diff options
author | Mel Gorman <mel@skynet.ie> | 2006-10-28 13:38:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-28 14:30:55 -0400 |
commit | 0c6cb974636dd29681b03f8eb0ae227decab01fb (patch) | |
tree | dfcf831a0c067eec8e1afbd4c22be3e1e736155e /mm/page_alloc.c | |
parent | 057647fc47b3a5fbcfa997041db3f483d506603c (diff) |
[PATCH] Calculation fix for memory holes beyong the end of physical memory
absent_pages_in_range() made the assumption that users of the
arch-independent zone-sizing API would not care about holes beyound the end
of physical memory. This was not the case and was "fixed" in a patch
called "Account for holes that are outside the range of physical memory".
However, when given a range that started before a hole in "real" memory and
ended beyond the end of memory, it would get the result wrong. The bug is
in mainline but a patch is below.
It has been tested successfully on a number of machines and architectures.
Additional credit to Keith Mannthey for discovering the problem, helping
identify the correct fix and confirming it Worked For Him.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: keith mannthey <kmannth@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index ecf853b5e30e..b55bb358b832 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -2261,7 +2261,7 @@ unsigned long __init __absent_pages_in_range(int nid, | |||
2261 | 2261 | ||
2262 | /* Account for ranges past physical memory on this node */ | 2262 | /* Account for ranges past physical memory on this node */ |
2263 | if (range_end_pfn > prev_end_pfn) | 2263 | if (range_end_pfn > prev_end_pfn) |
2264 | hole_pages = range_end_pfn - | 2264 | hole_pages += range_end_pfn - |
2265 | max(range_start_pfn, prev_end_pfn); | 2265 | max(range_start_pfn, prev_end_pfn); |
2266 | 2266 | ||
2267 | return hole_pages; | 2267 | return hole_pages; |