Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
numa_emulation.c File Reference
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/topology.h>
#include <linux/memblock.h>
#include <linux/bootmem.h>
#include <asm/dma.h>
#include "numa_internal.h"

Go to the source code of this file.

Functions

void __init numa_emu_cmdline (char *str)
 
void __init numa_emulation (struct numa_meminfo *numa_meminfo, int numa_dist_cnt)
 
void __cpuinit numa_add_cpu (int cpu)
 
void __cpuinit numa_remove_cpu (int cpu)
 

Function Documentation

void __cpuinit numa_add_cpu ( int  cpu)

Definition at line 447 of file numa_emulation.c.

void __init numa_emu_cmdline ( char str)

Definition at line 16 of file numa_emulation.c.

void __init numa_emulation ( struct numa_meminfo numa_meminfo,
int  numa_dist_cnt 
)

numa_emulation - Emulate NUMA nodes : NUMA configuration to massage : The size of the physical NUMA distance table

Emulate NUMA nodes according to the numa=fake kernel parameter. contains the physical memory configuration and is modified to reflect the emulated configuration on success. is used to determine the size of the physical distance table.

On success, the following modifications are made.

  • is updated to reflect the emulated nodes.
  • __apicid_to_node[] is updated such that APIC IDs are mapped to the emulated nodes.
  • NUMA distance table is rebuilt to represent distances between emulated nodes. The distances are determined considering how emulated nodes are mapped to physical nodes and match the actual distances.
  • emu_nid_to_phys[] reflects how emulated nodes are mapped to physical nodes. This is used by numa_add_cpu() and numa_remove_cpu().

If emulation is not enabled or fails, emu_nid_to_phys[] is filled with identity mapping and no other modification is made.

Definition at line 310 of file numa_emulation.c.

void __cpuinit numa_remove_cpu ( int  cpu)

Definition at line 465 of file numa_emulation.c.