lkml.org 
[lkml]   [2012]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[RFC][PATCH 3/5] x86: Allow specifying node_distance() for numa=fake
    Allows emulating more interesting NUMA configurations like a quad
    socket AMD Magny-Cour:

    "numa=fake=8:10,16,16,22,16,22,16,22,
    16,10,22,16,22,16,22,16,
    16,22,10,16,16,22,16,22,
    22,16,16,10,22,16,22,16,
    16,22,16,22,10,16,16,22,
    22,16,22,16,16,10,22,16,
    16,22,16,22,16,22,10,16,
    22,16,22,16,22,16,16,10"

    Which has a non-fully-connected topology.

    Cc: Tejun Heo <tj@kernel.org>
    Cc: Yinghai Lu <yinghai@kernel.org>
    Cc: x86@kernel.org
    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    ---
    arch/x86/mm/numa_emulation.c | 8 ++++++--
    1 file changed, 6 insertions(+), 2 deletions(-)

    Index: linux-2.6/arch/x86/mm/numa_emulation.c
    ===================================================================
    --- linux-2.6.orig/arch/x86/mm/numa_emulation.c
    +++ linux-2.6/arch/x86/mm/numa_emulation.c
    @@ -339,9 +339,11 @@ void __init numa_emulation(struct numa_m
    } else {
    unsigned long n;

    - n = simple_strtoul(emu_cmdline, NULL, 0);
    + n = simple_strtoul(emu_cmdline, &emu_cmdline, 0);
    ret = split_nodes_interleave(&ei, &pi, 0, max_addr, n);
    }
    + if (*emu_cmdline == ':')
    + emu_cmdline++;

    if (ret < 0)
    goto no_emu;
    @@ -418,7 +420,9 @@ void __init numa_emulation(struct numa_m
    int physj = emu_nid_to_phys[j];
    int dist;

    - if (physi >= numa_dist_cnt || physj >= numa_dist_cnt)
    + if (get_option(&emu_cmdline, &dist) == 2)
    + ;
    + else if (physi >= numa_dist_cnt || physj >= numa_dist_cnt)
    dist = physi == physj ?
    LOCAL_DISTANCE : REMOTE_DISTANCE;
    else



    \
     
     \ /
      Last update: 2012-05-01 20:41    [W:0.022 / U:0.304 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site