lkml.org 
[lkml]   [2008]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 2/2] bootmem: Node-setup agnostic free_bootmem()
Date
Hi,

"Yinghai Lu" <yhlu.kernel@gmail.com> writes:

> On Sat, Apr 12, 2008 at 3:33 PM, Johannes Weiner <hannes@saeurebad.de> wrote:
>> Make free_bootmem() look up the node holding the specified address
>> range which lets it work transparently on single-node and multi-node
>> configurations.
>>
>> Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
>> CC: Yinghai Lu <yhlu.kernel@gmail.com>
>> CC: Andi Kleen <ak@suse.de>
>> CC: Yasunori Goto <y-goto@jp.fujitsu.com>
>> CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>> CC: Ingo Molnar <mingo@elte.hu>
>> CC: Christoph Lameter <clameter@sgi.com>
>> CC: Andrew Morton <akpm@linux-foundation.org>
>> ---
>>
>> Patch tested on x86_32 uma.
>>
>> Index: linux-2.6/mm/bootmem.c
>> ===================================================================
>> --- linux-2.6.orig/mm/bootmem.c
>> +++ linux-2.6/mm/bootmem.c
>> @@ -421,7 +421,15 @@ 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) {
>> + if (addr < bdata->node_boot_start)
>> + continue;
>
> could have chance that bootmem with reserved_early that is crossing
> the nodes.

Upstream reserve_bootmem_core() would BUG() on a caller trying to cross
nodes, so I don't see where this chance could come from.

Hannes


\
 
 \ /
  Last update: 2008-04-13 13:01    [W:0.083 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site