Re: [PATCH -mm 11/14] bootmem: respect goal more likely

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johannes Weiner
Date: Tuesday, June 3, 2008 - 9:16 am

Hi,

Yasunori Goto <y-goto@jp.fujitsu.com> writes:


I think I found it.


This check is backwards and probably made your boot fail.


Changed this to break, because we don't need to search any further if
the current node already starts at/above the limit (remember, we walk a
list sorted by ->node_boot_start here).

I also made the checks more intuitively understandable.

Could you try the following fix on top of this patch?

	Hannes

--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -513,10 +513,10 @@ restart:
 	list_for_each_entry(bdata, &bdata_list, list) {
 		void *region;
 
-		if (goal && goal < bdata->node_boot_start)
-			continue;
-		if (limit && limit < bdata->node_boot_start)
+		if (goal && bdata->node_low_pfn <= PFN_DOWN(goal))
 			continue;
+		if (limit && bdata->node_boot_start >= limit)
+			break;
 
 		region = alloc_bootmem_core(bdata, size, align, goal, limit);
 		if (region)
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mm 11/14] bootmem: respect goal more likely, Johannes Weiner, (Mon Jun 2, 5:50 pm)
Re: [PATCH -mm 11/14] bootmem: respect goal more likely, Yasunori Goto, (Tue Jun 3, 6:59 am)
Re: [PATCH -mm 11/14] bootmem: respect goal more likely, Johannes Weiner, (Tue Jun 3, 9:16 am)
Re: [PATCH -mm 11/14] bootmem: respect goal more likely, Yasunori Goto, (Wed Jun 4, 3:55 am)
Re: [PATCH -mm 11/14] bootmem: respect goal more likely, Johannes Weiner, (Wed Jun 4, 1:25 pm)
Re: [PATCH -mm 11/14] bootmem: respect goal more likely, Yasunori Goto, (Wed Jun 4, 7:58 pm)
Re: [PATCH -mm 11/14] bootmem: respect goal more likely, Johannes Weiner, (Wed Jun 4, 9:13 pm)
Re: [PATCH -mm 11/14] bootmem: respect goal more likely, Yasunori Goto, (Thu Jun 5, 1:31 am)
Re: [PATCH -mm 11/14] bootmem: respect goal more likely, Johannes Weiner, (Thu Jun 5, 9:41 am)
Re: [PATCH -mm 11/14] bootmem: respect goal more likely, Yasunori Goto, (Thu Jun 5, 5:25 pm)