lkml.org 
[lkml]   [2010]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH 26/39] nobootmem: use lmb.default_alloc_limit in alloc_bootmem path
    From
    Date
    On Thu, 2010-04-08 at 23:03 -0700, Yinghai Lu wrote:
    > Generic version __lmb_find_area() is going from high to low, and for 32bit
    > active_region for 32bit does include high pages
    >
    > need to replace the limit with lmb.default_alloc_limit, aka get_max_mapped()
    >
    > with this patch, x86 32bit could use generic version of __lmb_find_area()

    So you unconditionally add access to some lmb specific data structure to
    generic code ? That isn't going to work very well on archs that don't
    use lmb.

    Also, those things should be local to lmb_* anyways.

    Cheers,
    Ben.

    > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
    > ---
    > mm/page_alloc.c | 3 +++
    > 1 files changed, 3 insertions(+), 0 deletions(-)
    >
    > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
    > index 79bd44b..256aed0 100644
    > --- a/mm/page_alloc.c
    > +++ b/mm/page_alloc.c
    > @@ -3445,6 +3445,9 @@ void * __init __alloc_memory_core_early(int nid, u64 size, u64 align,
    >
    > u64 addr;
    >
    > + if (limit > lmb.default_alloc_limit)
    > + limit = lmb.default_alloc_limit;
    > +
    > addr = find_memory_core_early(nid, size, align, goal, limit);
    >
    > if (addr == -1ULL)




    \
     
     \ /
      Last update: 2010-04-13 06:27    [W:0.021 / U:396.972 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site