1. 18 May, 2009 4 commits
    • Yinghai Lu's avatar
      x86: fix system without memory on node0 · 35d5a9a6
      Yinghai Lu authored
      Jack found a boot crash on a system which doesn't have memory on node0.
      
      It turns out with recent per_cpu changes, node_number for BSP will always
      be 0, and it is not consistent to cpu_to_node() that might set it to a
      different (nearer) node already.
      
      aka when numa_set_node() for node0 is called early before per_cpu area is
      setup:
      
      two places touched that per_cpu(node_number,):
      
      1. in cpu/common.c::cpu_init() and it is not for BP
      | #ifdef CONFIG_NUMA
      |        if (cpu != 0 && percpu_read(node_number) == 0 &&
      |            cpu_to_node(cpu) != NUMA_NO_NODE)
      |                percpu_write(node_number, cpu_to_node(cpu));
      | #endif
      for BP: traps_init ==> cpu_init
      for AP: start_secondary ==> cpu_init
      
      2. cpu/intel.c or amd.c::srat_detect_node via numa_set_node()
      for BP: check_bugs ==> identify_boot_cpu ==> identify_cpu()
      	 that is rather later before numa_node_id() is used for BP...
      for AP: start_secondary => smp_callin => smp_store_cpu_info() =>
      	=> identify_secondary_cpu => identify_cpu()
      
      so try to set that for BP earlier in setup_per_cpu_areas(), and
      don't bother to set that for APs there (it will be updated later
      and will be used later)
      
      (and don't mess the 0 before the copying BP per_cpu data to APs)
      
      [ Impact: fix boot crash on memoryless node-0 ]
      Reported-and-tested-by: default avatarJack Steiner <steiner@sgi.com>
      Cc: Tejun Heo <htejun@gmail.com>
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      LKML-Reference: <4A0C4A02.7050401@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      35d5a9a6
    • Yinghai Lu's avatar
      x86, mm: Fix node_possible_map logic · 7c43769a
      Yinghai Lu authored
      Recently there were some changes to the meaning of node_possible_map,
      and it is quite strange:
      
      - the node without memory would be set in node_possible_map
      - but some node with less NODE_MIN_SIZE will be kicked out of node_possible_map.
      
      fix it by adding strict_setup_node_bootmem().
      
      Also, remove unparse_node().
      
      so result will be:
      
      1. cpu_to_node() will return online node only (nearest one)
      2. apicid_to_node() still returns the node that could be not online but is set
         in node_possible_map.
      3. node_possible_map will include nodes that mem on it are less NODE_MIN_SIZE
      
      v2: after move_cpus_to_node change.
      
      [ Impact: get node_possible_map right ]
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Tested-by: default avatarJack Steiner <steiner@sgi.com>
      LKML-Reference: <4A0C49BE.6080800@kernel.org>
      [ v3: various small cleanups and comment clarifications ]
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      7c43769a
    • Yinghai Lu's avatar
      mm, x86: remove MEMORY_HOTPLUG_RESERVE related code · 888a589f
      Yinghai Lu authored
      after:
      
       | commit b263295d
       | Author: Christoph Lameter <clameter@sgi.com>
       | Date:   Wed Jan 30 13:30:47 2008 +0100
       |
       |    x86: 64-bit, make sparsemem vmemmap the only memory model
      
      we don't have MEMORY_HOTPLUG_RESERVE anymore.
      
      Historically, x86-64 had an architecture-specific method for memory hotplug
      whereby it scanned the SRAT for physical memory ranges that could be
      potentially used for memory hot-add later. By reserving those ranges
      without physical memory, the memmap would be allocated and left dormant
      until needed. This depended on the DISCONTIG memory model which has been
      removed so the code implementing HOTPLUG_RESERVE is now dead.
      
      This patch removes the dead code used by MEMORY_HOTPLUG_RESERVE.
      
      (Changelog authored by Mel.)
      
      v2: updated changelog, and remove hotadd= in doc
      
      [ Impact: remove dead code ]
      Signed-off-by: default avatarYinghai Lu <yinghai@kernel.org>
      Reviewed-by: default avatarChristoph Lameter <cl@linux-foundation.org>
      Reviewed-by: default avatarMel Gorman <mel@csn.ul.ie>
      Workflow-found-OK-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      LKML-Reference: <4A0C4910.7090508@kernel.org>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      888a589f
    • Ingo Molnar's avatar
      Merge commit 'v2.6.30-rc6' into x86/mm · b286e218
      Ingo Molnar authored
      Merge reason: sync up to -rc6 which has changes to mm/ which we are
                    going to touch in the commits to follow as well.
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      b286e218
  2. 16 May, 2009 1 commit
  3. 15 May, 2009 35 commits