Messages in this thread | | | Date | Tue, 05 Apr 2011 10:28:49 -0700 | From | Yinghai Lu <> | Subject | Re: [PATCH 02/14] x86-32, NUMA: Align pgdat size while initializing alloc_remap |
| |
On 04/04/2011 03:23 PM, Tejun Heo wrote: > When pgdat is reserved in init_remap_allocator(), PAGE_SIZE aligned > size will be used. Match the size alignment in initialization to > avoid allocation failure down the road. > > Signed-off-by: Tejun Heo<tj@kernel.org> > Cc: Yinghai Lu<yinghai@kernel.org> > Cc: David Rientjes<rientjes@google.com> > Cc: Thomas Gleixner<tglx@linutronix.de > Cc: Ingo Molnar<mingo@redhat.com> > Cc: "H. Peter Anvin"<hpa@zytor.com> > --- > arch/x86/mm/numa_32.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c > index 84aac47..50e8250 100644 > --- a/arch/x86/mm/numa_32.c > +++ b/arch/x86/mm/numa_32.c > @@ -287,7 +287,8 @@ static __init unsigned long calculate_numa_remap_pages(void) > node_end_pfn[nid] = max_pfn; > > /* ensure the remap includes space for the pgdat. */ > - size = node_remap_size[nid] + sizeof(pg_data_t); > + size = node_remap_size[nid]; > + size += ALIGN(sizeof(pg_data_t), PAGE_SIZE); > > /* convert size to large (pmd size) pages, rounding up */ > size = (size + LARGE_PAGE_BYTES - 1) / LARGE_PAGE_BYTES;
Acked-by: Yinghai Lu <yinghai@kernel.org>
| |