[lkml]   [2008]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] mm: fix boundary checking in free_bootmem_core
On 14 Mar 2008 12:58:44 +0100, Andi Kleen <> wrote:
> "Yinghai Lu" <> writes:
> >
> > then i tried to reserve 64M or 128M RAM before that, and free that
> > before gart/switotble try to allloc_bootmem under 4g.
> Sounds like an incredible hack. There are far better ways to do that
> for bootmem allocations. e.g. you can just specify a high enough "goal"
> That is how swiotlb solves a similar problem (at least before my
> mask allocator rewrite)

I don't think so.

anyway, otherway to workaround it is
return __earlyonly_bootmem_alloc(node, size, size,
in vmemmap_alloc_block to
return __earlyonly_bootmem_alloc(node, size, size,
__pa(MAX_DMA_ADDRESS + (1<<27)));
to make room for gart. but that is global change. and may affect other
platform. and don't make sure gart will get it.

also i assume swiotlb need that range is less than 4g.

> > > with your improved free_bootmem()
> >
> > using phys_to_nid()? it seems we only have that on x86_64.
> pfn/page_to_nid() is generic afaik.

still in bootmem stage? page->flags is ready at that time?


 \ /
  Last update: 2008-03-14 17:47    [W:0.051 / U:15.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site