lkml.org 
[lkml]   [2010]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] mm/page_alloc: fix the range check for backward merging
From: Kazuhisa Ichikawa <ki@epsilou.com>

The current check for 'backward merging' within add_active_range()
does not seem correct. start_pfn must be compared against
early_node_map[i].start_pfn (and NOT against .end_pfn) to find out
whether the new region is backward-mergeable with the existing range.

Signed-off-by: Kazuhisa Ichikawa <ki@epsilou.com>
---
(This patch applies to linux-2.6.33-rc2)

--- a/mm/page_alloc.c 2009-12-25 06:09:41.000000000 +0900
+++ b/mm/page_alloc.c 2010-01-03 19:20:36.000000000 +0900
@@ -3998,7 +3998,7 @@ void __init add_active_range(unsigned in
}

/* Merge backward if suitable */
- if (start_pfn < early_node_map[i].end_pfn &&
+ if (start_pfn < early_node_map[i].start_pfn &&
end_pfn >= early_node_map[i].start_pfn) {
early_node_map[i].start_pfn = start_pfn;
return;

\
 
 \ /
  Last update: 2010-01-03 13:29    [W:0.295 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site