• Mel Gorman's avatar
    x86: make NUMA work on 32-bit · 1b000a5d
    Mel Gorman authored
    The DISCONTIG memory model on x86 32 bit uses a remap allocator early
    in boot. The objective is that portions of every node are mapped in to
    the kernel virtual area (KVA) in place of ZONE_NORMAL so that node-local
    allocations can be made for pgdat and mem_map structures.
    
    With SPARSEMEM, the amount that is set aside is insufficient for all the
    mem_maps to be allocated. During the boot process, it falls back to using
    the bootmem allocator. This breaks assumptions that SPARSEMEM makes about
    the layout of the mem_map in memory and results in a VM_BUG_ON triggering
    due to pfn_to_page() returning garbage values.
    
    This patch only enables the remap allocator for use with DISCONTIG.
    
    Without SRAT support, a compile-error occurs because ACPI table parsing
    functions are only available in x86-64. This patch also adds no-op stubs
    and prints a warning message. What likely needs to be done is sharing
    the table parsing functions between 32 and 64 bit if they are
    compatible.
    Signed-off-by: default avatarMel Gorman <mel@csn.ul.ie>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    1b000a5d
discontig_32.c 14.2 KB