Re: [PATCH] alloc_bootmem_core: fix misaligned allocation of 1G page

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andreas Herrmann
Date: Wednesday, August 13, 2008 - 12:31 pm

On Wed, Aug 13, 2008 at 08:18:04PM +0200, Johannes Weiner wrote:


No typo. I guess the confusion is just my ambiguous wording.
It's what your previous patch generated. At the end it "aligned" the first
1G page on node 1 at 0x180000000 (== the return value of alloc_bootmem_core)
but it reserved the region from 0x170000000:

  Aug 13 16:05:49 brandon bootmem::alloc_bootmem_core nid=1 size=40000000
    [262144 pages] align=40000000 goal=0 limit=0
  Aug 13 16:05:49 brandon bootmem::__reserve nid=1 start=170000 end=1b0000 flags=1
  Aug 13 16:05:49 brandon addr:ffff880180000000, paddr:0000000180000000, size: 1073741824

... and after some time ...

  BUG: unable to handle kernel NULL pointer dereference at 000000000000000a
  IP: [<ffffffff80261a87>] get_page_from_freelist+0x403/0x5ed
  PGD 22f108067 PUD 22dc3d067 PMD 0
  Oops: 0000 [1] SMP
  ...



Nice.
That's the preferred solution and should replace my initial fix.

Reviewed-and-tested-by: Andreas Herrmann <andreas.herrmann3@amd.com>


Thanks,

Andreas




--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] alloc_bootmem_core: fix misaligned allocation ..., Andreas Herrmann, (Wed Aug 13, 9:41 am)
Re: [PATCH] alloc_bootmem_core: fix misaligned allocation ..., Johannes Weiner, (Wed Aug 13, 11:18 am)
Re: [PATCH] alloc_bootmem_core: fix misaligned allocation ..., Andreas Herrmann, (Wed Aug 13, 12:31 pm)