[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <86802c440804121859x42847c2cx37b8cd909b14c6b5@mail.gmail.com>
Date: Sat, 12 Apr 2008 18:59:56 -0700
From: "Yinghai Lu" <yhlu.kernel@...il.com>
To: "Johannes Weiner" <hannes@...urebad.de>
Cc: linux-kernel@...r.kernel.org, "Andi Kleen" <ak@...e.de>,
"Ingo Molnar" <mingo@...e.hu>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Yasunori Goto" <y-goto@...fujitsu.com>,
"KAMEZAWA Hiroyuki" <kamezawa.hiroyu@...fujitsu.com>,
"Christoph Lameter" <clameter@....com>
Subject: Re: [patch 2/2] bootmem: Node-setup agnostic free_bootmem()
On Sat, Apr 12, 2008 at 3:33 PM, Johannes Weiner <hannes@...urebad.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@...urebad.de>
> CC: Yinghai Lu <yhlu.kernel@...il.com>
> CC: Andi Kleen <ak@...e.de>
> CC: Yasunori Goto <y-goto@...fujitsu.com>
> CC: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
> CC: Ingo Molnar <mingo@...e.hu>
> CC: Christoph Lameter <clameter@....com>
> CC: Andrew Morton <akpm@...ux-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.
YH
YH
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists