Messages in this thread Patch in this message |  | | Date | Mon, 14 Jan 2013 14:35:12 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH v5 2/5] page_alloc: add movable_memmap kernel parameter |
| |
On Mon, 14 Jan 2013 17:15:22 +0800 Tang Chen <tangchen@cn.fujitsu.com> 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 {
|  |