Re: [PATCH -mm 11/14] bootmem: respect goal more likely

From: Johannes Weiner
Date: Fri May 30 2008 - 16:17:44 EST


Hi,

Johannes Weiner <hannes@xxxxxxxxxxxx> writes:

> The old node-agnostic code tried allocating on all nodes starting from
> the one with the lowest range. alloc_bootmem_core retried without the
> goal if it could not satisfy it and so the goal was only respected at
> all when it happened to be on the first (lowest page numbers) node (or
> theoretically if allocations failed on all nodes before to the one
> holding the goal).
>
> Introduce a non-panicking helper that starts allocating from the node
> holding the goal and falls back only after all thes tries failed.
>
> Make all other allocation helpers benefit from this new helper.
>
> Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxxx>
> CC: Ingo Molnar <mingo@xxxxxxx>
> CC: Yinghai Lu <yhlu.kernel@xxxxxxxxx>
> CC: Andi Kleen <andi@xxxxxxxxxxxxxx>
> ---
>
> mm/bootmem.c | 77 +++++++++++++++++++++++++++++++----------------------------
> 1 file changed, 41 insertions(+), 36 deletions(-)
>
> --- a/mm/bootmem.c
> +++ b/mm/bootmem.c
> @@ -487,11 +487,33 @@ find_block:
> memset(region, 0, size);
> return region;
> }
> + return NULL;
> +}

Sorry, forgot to update ->last_success handling here. Update coming soon.

Hannes
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/