linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/page_alloc: fix the range check for backward merging
@ 2010-01-03 12:04 Kazuhisa Ichikawa
  2010-01-04 21:02 ` David Rientjes
  0 siblings, 1 reply; 2+ messages in thread
From: Kazuhisa Ichikawa @ 2010-01-03 12:04 UTC (permalink / raw)
  To: linux-mm; +Cc: linux-kernel

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;

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/page_alloc: fix the range check for backward merging
  2010-01-03 12:04 [PATCH] mm/page_alloc: fix the range check for backward merging Kazuhisa Ichikawa
@ 2010-01-04 21:02 ` David Rientjes
  0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2010-01-04 21:02 UTC (permalink / raw)
  To: Andrew Morton, Kazuhisa Ichikawa; +Cc: linux-mm, linux-kernel

On Sun, 3 Jan 2010, Kazuhisa Ichikawa wrote:

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

Acked-by: David Rientjes <rientjes@google.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-04 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-03 12:04 [PATCH] mm/page_alloc: fix the range check for backward merging Kazuhisa Ichikawa
2010-01-04 21:02 ` David Rientjes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).