lkml.org 
[lkml]   [2008]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -mm 11/14] bootmem: respect goal more likely
Date
Hi,

Johannes Weiner <hannes@saeurebad.de> 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@saeurebad.de>
> CC: Ingo Molnar <mingo@elte.hu>
> CC: Yinghai Lu <yhlu.kernel@gmail.com>
> CC: Andi Kleen <andi@firstfloor.org>
> ---
>
> 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


\
 
 \ /
  Last update: 2008-05-30 22:19    [W:0.082 / U:3.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site