On Mon, 14 Jan 2013 17:15:22 +0800 Tang Chen <tangchen@xxxxxxxxxxxxxx> wrote: > This patch adds functions to parse movablecore_map boot option. Since the > option could be specified more then once, all the maps will be stored in > the global variable movablecore_map.map array. > > And also, we keep the array in monotonic increasing order by start_pfn. > And merge all overlapped ranges. > > ... > > +#define MOVABLECORE_MAP_MAX MAX_NUMNODES > +struct movablecore_entry { > + unsigned long start_pfn; /* start pfn of memory segment */ > + unsigned long end_pfn; /* end pfn of memory segment */ It is important to tell readers whether an "end" is inclusive or exclusive. ie: does it point at the last byte, or one beyond it? By reading the code I see it is exclusive, so... --- a/include/linux/mm.h~page_alloc-add-movable_memmap-kernel-parameter-fix +++ a/include/linux/mm.h @@ -1362,7 +1362,7 @@ extern void sparse_memory_present_with_a #define MOVABLECORE_MAP_MAX MAX_NUMNODES struct movablecore_entry { unsigned long start_pfn; /* start pfn of memory segment */ - unsigned long end_pfn; /* end pfn of memory segment */ + unsigned long end_pfn; /* end pfn of memory segment (exclusive) */ }; struct movablecore_map { -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>