lkml.org 
[lkml]   [2011]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 08/14] x86-32, NUMA: Make init_alloc_remap() less panicky
    Date
    Remap allocator failure isn't fatal.  The callers are required to fall
    back to regular early memory allocation mechanisms on failure anyway,
    so there's no reason to panic on remap init failure. Whining and
    returning are enough.

    Signed-off-by: Tejun Heo <tj@kernel.org>
    Cc: Yinghai Lu <yinghai@kernel.org>
    Cc: David Rientjes <rientjes@google.com>
    Cc: Thomas Gleixner <tglx@linutronix.de
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    ---
    arch/x86/mm/numa_32.c | 7 +++++--
    1 files changed, 5 insertions(+), 2 deletions(-)

    diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
    index 9a73365..c127543 100644
    --- a/arch/x86/mm/numa_32.c
    +++ b/arch/x86/mm/numa_32.c
    @@ -290,8 +290,11 @@ static __init unsigned long init_alloc_remap(int nid, unsigned long offset)
    node_pa = memblock_find_in_range(node_start_pfn[nid] << PAGE_SHIFT,
    (u64)node_end_pfn[nid] << PAGE_SHIFT,
    size, LARGE_PAGE_BYTES);
    - if (node_pa == MEMBLOCK_ERROR)
    - panic("Can not get kva ram\n");
    + if (node_pa == MEMBLOCK_ERROR) {
    + pr_warning("remap_alloc: failed to allocate %lu bytes for node %d\n",
    + size, nid);
    + return 0;
    + }

    node_remap_size[nid] = size >> PAGE_SHIFT;
    node_remap_offset[nid] = offset;
    --
    1.7.1


    \
     
     \ /
      Last update: 2011-04-05 00:29    [W:0.021 / U:121.292 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site