Linux Kernel
3.7.1
|
#include <linux/stddef.h>
#include <linux/mm.h>
#include <linux/swap.h>
#include <linux/interrupt.h>
#include <linux/pagemap.h>
#include <linux/jiffies.h>
#include <linux/bootmem.h>
#include <linux/memblock.h>
#include <linux/compiler.h>
#include <linux/kernel.h>
#include <linux/kmemcheck.h>
#include <linux/module.h>
#include <linux/suspend.h>
#include <linux/pagevec.h>
#include <linux/blkdev.h>
#include <linux/slab.h>
#include <linux/ratelimit.h>
#include <linux/oom.h>
#include <linux/notifier.h>
#include <linux/topology.h>
#include <linux/sysctl.h>
#include <linux/cpu.h>
#include <linux/cpuset.h>
#include <linux/memory_hotplug.h>
#include <linux/nodemask.h>
#include <linux/vmalloc.h>
#include <linux/vmstat.h>
#include <linux/mempolicy.h>
#include <linux/stop_machine.h>
#include <linux/sort.h>
#include <linux/pfn.h>
#include <linux/backing-dev.h>
#include <linux/fault-inject.h>
#include <linux/page-isolation.h>
#include <linux/page_cgroup.h>
#include <linux/debugobjects.h>
#include <linux/kmemleak.h>
#include <linux/compaction.h>
#include <trace/events/kmem.h>
#include <linux/ftrace_event.h>
#include <linux/memcontrol.h>
#include <linux/prefetch.h>
#include <linux/migrate.h>
#include <linux/page-debug-flags.h>
#include <asm/tlbflush.h>
#include <asm/div64.h>
#include "internal.h"
Go to the source code of this file.
Macros | |
#define | K(x) ((x) << (PAGE_SHIFT-10)) |
#define | ZONELIST_ORDER_DEFAULT 0 |
#define | ZONELIST_ORDER_NODE 1 |
#define | ZONELIST_ORDER_ZONE 2 |
#define | PAGES_PER_WAITQUEUE 256 |
#define | LONG_ALIGN(x) (((x)+(sizeof(long))-1)&~((sizeof(long))-1)) |
#define | memmap_init(size, nid, zone, start_pfn) memmap_init_zone((size), (nid), (zone), (start_pfn), MEMMAP_EARLY) |
Variables | |
nodemask_t node_states[NR_NODE_STATES] | __read_mostly |
int | percpu_pagelist_fraction |
int | sysctl_lowmem_reserve_ratio [MAX_NR_ZONES-1] |
int | min_free_kbytes = 1024 |
int | hashdist = HASHDIST_DEFAULT |
#define K | ( | x | ) | ((x) << (PAGE_SHIFT-10)) |
Definition at line 2878 of file page_alloc.c.
Definition at line 3696 of file page_alloc.c.
#define memmap_init | ( | size, | |
nid, | |||
zone, | |||
start_pfn | |||
) | memmap_init_zone((size), (nid), (zone), (start_pfn), MEMMAP_EARLY) |
Definition at line 3869 of file page_alloc.c.
#define PAGES_PER_WAITQUEUE 256 |
Definition at line 3641 of file page_alloc.c.
#define ZONELIST_ORDER_DEFAULT 0 |
Definition at line 3072 of file page_alloc.c.
#define ZONELIST_ORDER_NODE 1 |
Definition at line 3073 of file page_alloc.c.
#define ZONELIST_ORDER_ZONE 2 |
Definition at line 3074 of file page_alloc.c.
|
read |
Definition at line 2590 of file page_alloc.c.
Definition at line 2682 of file page_alloc.c.
Definition at line 733 of file page_alloc.c.
Definition at line 2659 of file page_alloc.c.
void* __init alloc_large_system_hash | ( | const char * | tablename, |
unsigned long | bucketsize, | ||
unsigned long | numentries, | ||
int | scale, | ||
int | flags, | ||
unsigned int * | _hash_shift, | ||
unsigned int * | _hash_mask, | ||
unsigned long | low_limit, | ||
unsigned long | high_limit | ||
) |
Definition at line 5401 of file page_alloc.c.
alloc_pages_exact - allocate an exact number physically-contiguous pages. : the number of bytes to allocate : GFP flags for the allocation
This function is similar to alloc_pages(), except that it allocates the minimum number of pages to satisfy the request. alloc_pages() can only allocate memory in power-of-two pages.
This function is also limited by MAX_ORDER.
Memory allocated by this function must be released by free_pages_exact().
Definition at line 2732 of file page_alloc.c.
alloc_pages_exact_nid - allocate an exact number of physically-contiguous pages on a node. : the preferred node ID where memory should be allocated : the number of bytes to allocate : GFP flags for the allocation
Like alloc_pages_exact(), but try to allocate on node nid first before falling back. Note this is not alloc_pages_exact_node() which allocates on a specific node, but is not exact.
Definition at line 2754 of file page_alloc.c.
Definition at line 3588 of file page_alloc.c.
Definition at line 1384 of file page_alloc.c.
DEFINE_MUTEX | ( | zonelists_mutex | ) |
Definition at line 1218 of file page_alloc.c.
Definition at line 1204 of file page_alloc.c.
Definition at line 6093 of file page_alloc.c.
EXPORT_SYMBOL | ( | node_states | ) |
EXPORT_SYMBOL | ( | totalram_pages | ) |
EXPORT_SYMBOL | ( | __alloc_pages_nodemask | ) |
EXPORT_SYMBOL | ( | __get_free_pages | ) |
EXPORT_SYMBOL | ( | get_zeroed_page | ) |
EXPORT_SYMBOL | ( | __free_pages | ) |
EXPORT_SYMBOL | ( | free_pages | ) |
EXPORT_SYMBOL | ( | alloc_pages_exact | ) |
EXPORT_SYMBOL | ( | alloc_pages_exact_nid | ) |
EXPORT_SYMBOL | ( | free_pages_exact | ) |
EXPORT_SYMBOL | ( | si_meminfo | ) |
EXPORT_SYMBOL_GPL | ( | nr_free_buffer_pages | ) |
Definition at line 5008 of file page_alloc.c.
void __paginginit free_area_init_node | ( | int | nid, |
unsigned long * | zones_size, | ||
unsigned long | node_start_pfn, | ||
unsigned long * | zholes_size | ||
) |
Definition at line 4564 of file page_alloc.c.
Definition at line 1293 of file page_alloc.c.
Definition at line 1341 of file page_alloc.c.
Definition at line 2694 of file page_alloc.c.
free_pages_exact - release memory allocated via alloc_pages_exact() : the value returned by alloc_pages_exact. : size of allocation, same value as passed to alloc_pages_exact().
Release the memory allocated by a previous call to alloc_pages_exact.
Definition at line 2771 of file page_alloc.c.
Definition at line 5521 of file page_alloc.c.
Definition at line 2676 of file page_alloc.c.
Definition at line 2376 of file page_alloc.c.
Definition at line 5579 of file page_alloc.c.
int __meminit init_currently_empty_zone | ( | struct zone * | zone, |
unsigned long | zone_start_pfn, | ||
unsigned long | size, | ||
enum memmap_context | context | ||
) |
Definition at line 4043 of file page_alloc.c.
Definition at line 5271 of file page_alloc.c.
Definition at line 5635 of file page_alloc.c.
int lowmem_reserve_ratio_sysctl_handler | ( | ctl_table * | table, |
int | write, | ||
void __user * | buffer, | ||
size_t * | length, | ||
loff_t * | ppos | ||
) |
Definition at line 5347 of file page_alloc.c.
void __meminit memmap_init_zone | ( | unsigned long | size, |
int | nid, | ||
unsigned long | zone, | ||
unsigned long | start_pfn, | ||
enum memmap_context | context | ||
) |
Definition at line 3801 of file page_alloc.c.
module_init | ( | init_per_zone_wmark_min | ) |
Definition at line 5288 of file page_alloc.c.
int move_freepages | ( | struct zone * | zone, |
struct page * | start_page, | ||
struct page * | end_page, | ||
int | migratetype | ||
) |
Definition at line 914 of file page_alloc.c.
Definition at line 958 of file page_alloc.c.
Definition at line 2806 of file page_alloc.c.
Definition at line 2815 of file page_alloc.c.
Definition at line 5043 of file page_alloc.c.
int percpu_pagelist_fraction_sysctl_handler | ( | ctl_table * | table, |
int | write, | ||
void __user * | buffer, | ||
size_t * | length, | ||
loff_t * | ppos | ||
) |
Definition at line 5361 of file page_alloc.c.
Definition at line 348 of file page_alloc.c.
set_dma_reserve - set the specified number of pages reserved in the first zone : The number of pages to mark reserved
The per-cpu batchsize and zone watermarks are determined by present_pages. In the DMA zone, a significant percentage may be consumed by kernel image and other unfreeable allocations which can skew the watermarks badly. This function may optionally be used to account for unfreeable pages in the first zone (e.g., ZONE_DMA). The effect will be lower watermarks and smaller per-cpu batchsize.
Definition at line 5003 of file page_alloc.c.
void set_pageblock_flags_group | ( | struct page * | page, |
unsigned long | flags, | ||
int | start_bitidx, | ||
int | end_bitidx | ||
) |
Definition at line 5549 of file page_alloc.c.
Definition at line 226 of file page_alloc.c.
Definition at line 4430 of file page_alloc.c.
Definition at line 3977 of file page_alloc.c.
setup_per_zone_wmarks - called when min_free_kbytes changes or when memory is hot-{added|removed}
Ensures that the watermark[min,low,high] values for each zone are set correctly with respect to min_free_kbytes.
Definition at line 5197 of file page_alloc.c.
Definition at line 2887 of file page_alloc.c.
Definition at line 2826 of file page_alloc.c.
Definition at line 2862 of file page_alloc.c.
Definition at line 1438 of file page_alloc.c.
Definition at line 1359 of file page_alloc.c.
Definition at line 2006 of file page_alloc.c.
bool zone_watermark_ok | ( | struct zone * | z, |
int | order, | ||
unsigned long | mark, | ||
int | classzone_idx, | ||
int | alloc_flags | ||
) |
Definition at line 1658 of file page_alloc.c.
bool zone_watermark_ok_safe | ( | struct zone * | z, |
int | order, | ||
unsigned long | mark, | ||
int | classzone_idx, | ||
int | alloc_flags | ||
) |
Definition at line 1665 of file page_alloc.c.
bool oom_killer_disabled __read_mostly |
Definition at line 85 of file page_alloc.c.
int hashdist = HASHDIST_DEFAULT |
Definition at line 5382 of file page_alloc.c.
int min_free_kbytes = 1024 |
Definition at line 194 of file page_alloc.c.
int percpu_pagelist_fraction |
Definition at line 108 of file page_alloc.c.
int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] |
Definition at line 165 of file page_alloc.c.