Linux Kernel
3.7.1
|
#include <linux/types.h>
#include <asm/numa.h>
Go to the source code of this file.
Data Structures | |
struct | numa_memblk |
struct | numa_meminfo |
Functions | |
void __init | numa_remove_memblk_from (int idx, struct numa_meminfo *mi) |
int __init | numa_cleanup_meminfo (struct numa_meminfo *mi) |
void __init | numa_reset_distance (void) |
void __init | x86_numa_init (void) |
void __init | init_alloc_remap (int nid, u64 start, u64 end) |
init_alloc_remap - Initialize remap allocator for a NUMA node : NUMA node to initizlie remap allocator for
NUMA nodes may end up without any lowmem. As allocating pgdat and memmap on a different node with lowmem is inefficient, a special remap allocator is implemented which can be used by alloc_remap().
For each node, the amount of memory which will be necessary for pgdat and memmap is calculated and two memory areas of the size are allocated - one in the node and the other in lowmem; then, the area in the node is remapped to the lowmem area.
As pgdat and memmap must be allocated in lowmem anyway, this doesn't waste lowmem address space; however, the actual lowmem which gets remapped over is wasted. The amount shouldn't be problematic on machines this feature will be used.
Initialization failure isn't fatal. alloc_remap() is used opportunistically and the callers will fall back to other memory allocation mechanisms on failure.
int __init numa_cleanup_meminfo | ( | struct numa_meminfo * | mi | ) |
numa_cleanup_meminfo - Cleanup a numa_meminfo : numa_meminfo to clean up
Sanitize by merging and removing unncessary memblks. Also check for conflicts and clear unused memblks.
RETURNS: 0 on success, -errno on failure.
void __init numa_remove_memblk_from | ( | int | idx, |
struct numa_meminfo * | mi | ||
) |
numa_remove_memblk_from - Remove one numa_memblk from a numa_meminfo : Index of memblk to remove : numa_meminfo to remove memblk from
Remove 'th numa_memblk from by shifting ->blk[] and decrementing ->nr_blks.
numa_reset_distance - Reset NUMA distance table
The current table is freed. The next numa_set_distance() call will create a new one.