Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
discontig.c File Reference
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/nmi.h>
#include <linux/swap.h>
#include <linux/bootmem.h>
#include <linux/acpi.h>
#include <linux/efi.h>
#include <linux/nodemask.h>
#include <linux/slab.h>
#include <asm/pgalloc.h>
#include <asm/tlb.h>
#include <asm/meminit.h>
#include <asm/numa.h>
#include <asm/sections.h>

Go to the source code of this file.

Data Structures

struct  early_node_data
 

Macros

#define MAX_NODE_ALIGN_OFFSET   (32 * 1024 * 1024)
 
#define NODEDATA_ALIGN(addr, node)
 

Functions

void __init find_memory (void)
 
void show_mem (unsigned int filter)
 
void call_pernode_memory (unsigned long start, unsigned long len, void *arg)
 
void __init paging_init (void)
 

Variables

pg_data_tpgdat_list [MAX_NUMNODES]
 

Macro Definition Documentation

#define MAX_NODE_ALIGN_OFFSET   (32 * 1024 * 1024)

Definition at line 57 of file discontig.c.

#define NODEDATA_ALIGN (   addr,
  node 
)
Value:
((((addr) + 1024*1024-1) & ~(1024*1024-1)) + \

Definition at line 58 of file discontig.c.

Function Documentation

void call_pernode_memory ( unsigned long  start,
unsigned long  len,
void arg 
)

call_pernode_memory - use SRAT to call callback functions with node info : physical start of range : length of range

  • : function to call for each range

efi_memmap_walk() knows nothing about layout of memory across nodes. Find out to which node a block of memory belongs. Ignore memory that we cannot identify, and split blocks that run across multiple nodes.

Take this opportunity to round the start address up and the end address down to page boundaries.

Definition at line 685 of file discontig.c.

void __init find_memory ( void  )

find_memory - walk the EFI memory map and setup the bootmem allocator

Called early in boot to setup the bootmem allocator, and to allocate the per-cpu and per-node structures.

Definition at line 526 of file discontig.c.

void __init paging_init ( void  )

paging_init - setup page tables

paging_init() sets up the page tables for each node of the system and frees the bootmem allocator memory for general use.

Definition at line 755 of file discontig.c.

void show_mem ( unsigned int  filter)

show_mem - give short summary of memory stats

Shows a simple page count of reserved and used pages in the system. For discontig machines, it does this on a per-pgdat basis.

Definition at line 617 of file discontig.c.

Variable Documentation

pg_data_t* pgdat_list[MAX_NUMNODES]

Definition at line 51 of file discontig.c.