lkml.org 
[lkml]   [2008]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: make free_bootmem to loop bdata_list
On Thu, Mar 13, 2008 at 6:39 PM, KAMEZAWA Hiroyuki
<kamezawa.hiroyu@jp.fujitsu.com> wrote:
> On Thu, 13 Mar 2008 11:53:31 -0700
> "Yinghai Lu" <yhlu.kernel@gmail.com> wrote:
> > ===================================================================
> > --- linux-2.6.orig/mm/bootmem.c
> > +++ linux-2.6/mm/bootmem.c
> > @@ -427,7 +438,9 @@ int __init reserve_bootmem(unsigned long
> >
> > void __init free_bootmem(unsigned long addr, unsigned long size)
> > {
> > - free_bootmem_core(NODE_DATA(0)->bdata, addr, size);
> > + bootmem_data_t *bdata;
> > + list_for_each_entry(bdata, &bdata_list, list)
> > + free_bootmem_core(bdata, addr, size);
> > }
>
>
> Just a confirmation.
> In above loop, boundary check in free_bootmem_core() hits two or more times ?
> If yes, it's ok.
> If no, please exit loop at hit.

yes. need that handle range cross node (RAMDISK case that is end
beyond end_of_ram).

YH


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