From f2d19f10fb35c04228fa859c3dfc1e8fa2801f08 Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Tue, 17 Jul 2007 04:03:14 -0700 Subject: [PATCH] --- yaml --- r: 60725 b: refs/heads/master c: ed7ed365172e27b0efe9d43cc962723c7193e34e h: refs/heads/master i: 60723: efe27a0b8d8ac3e2d965caa904e47a8ed0e71ade v: v3 --- [refs] | 2 +- trunk/Documentation/filesystems/proc.txt | 15 +++++++++++++++ trunk/Documentation/kernel-parameters.txt | 16 ++++++++++++++++ trunk/Documentation/sysctl/vm.txt | 3 ++- trunk/arch/ia64/kernel/efi.c | 1 + trunk/include/linux/mm.h | 1 - trunk/mm/page_alloc.c | 5 ++++- 7 files changed, 39 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 9800beb0a9a5..7c54795df23f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 396faf0303d273219db5d7eb4a2879ad977ed185 +refs/heads/master: ed7ed365172e27b0efe9d43cc962723c7193e34e diff --git a/trunk/Documentation/filesystems/proc.txt b/trunk/Documentation/filesystems/proc.txt index 460b892d089e..ebffdffb3d99 100644 --- a/trunk/Documentation/filesystems/proc.txt +++ b/trunk/Documentation/filesystems/proc.txt @@ -1348,6 +1348,21 @@ nr_hugepages configures number of hugetlb page reserved for the system. hugetlb_shm_group contains group id that is allowed to create SysV shared memory segment using hugetlb page. +hugepages_treat_as_movable +-------------------------- + +This parameter is only useful when kernelcore= is specified at boot time to +create ZONE_MOVABLE for pages that may be reclaimed or migrated. Huge pages +are not movable so are not normally allocated from ZONE_MOVABLE. A non-zero +value written to hugepages_treat_as_movable allows huge pages to be allocated +from ZONE_MOVABLE. + +Once enabled, the ZONE_MOVABLE is treated as an area of memory the huge +pages pool can easily grow or shrink within. Assuming that applications are +not running that mlock() a lot of memory, it is likely the huge pages pool +can grow to the size of ZONE_MOVABLE by repeatedly entering the desired value +into nr_hugepages and triggering page reclaim. + laptop_mode ----------- diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 8363ad3ba018..1794affbd06f 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -817,6 +817,22 @@ and is between 256 and 4096 characters. It is defined in the file js= [HW,JOY] Analog joystick See Documentation/input/joystick.txt. + kernelcore=nn[KMG] [KNL,IA-32,IA-64,PPC,X86-64] This parameter + specifies the amount of memory usable by the kernel + for non-movable allocations. The requested amount is + spread evenly throughout all nodes in the system. The + remaining memory in each node is used for Movable + pages. In the event, a node is too small to have both + kernelcore and Movable pages, kernelcore pages will + take priority and other nodes will have a larger number + of kernelcore pages. The Movable zone is used for the + allocation of pages that may be reclaimed or moved + by the page migration subsystem. This means that + HugeTLB pages may not be allocated from this zone. + Note that allocations like PTEs-from-HighMem still + use the HighMem zone if it exists, and the Normal + zone if it does not. + keepinitrd [HW,ARM] kstack=N [IA-32,X86-64] Print N words from the kernel stack diff --git a/trunk/Documentation/sysctl/vm.txt b/trunk/Documentation/sysctl/vm.txt index df3ff2095f9d..a0ccc5b60260 100644 --- a/trunk/Documentation/sysctl/vm.txt +++ b/trunk/Documentation/sysctl/vm.txt @@ -38,7 +38,8 @@ Currently, these files are in /proc/sys/vm: dirty_ratio, dirty_background_ratio, dirty_expire_centisecs, dirty_writeback_centisecs, vfs_cache_pressure, laptop_mode, -block_dump, swap_token_timeout, drop-caches: +block_dump, swap_token_timeout, drop-caches, +hugepages_treat_as_movable: See Documentation/filesystems/proc.txt diff --git a/trunk/arch/ia64/kernel/efi.c b/trunk/arch/ia64/kernel/efi.c index 75ec3478d8a2..73ca86d03810 100644 --- a/trunk/arch/ia64/kernel/efi.c +++ b/trunk/arch/ia64/kernel/efi.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include diff --git a/trunk/include/linux/mm.h b/trunk/include/linux/mm.h index 857e44817178..97d0cddfd223 100644 --- a/trunk/include/linux/mm.h +++ b/trunk/include/linux/mm.h @@ -1005,7 +1005,6 @@ extern unsigned long find_max_pfn_with_active_regions(void); extern void free_bootmem_with_active_regions(int nid, unsigned long max_low_pfn); extern void sparse_memory_present_with_active_regions(int nid); -extern int cmdline_parse_kernelcore(char *p); #ifndef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID extern int early_pfn_to_nid(unsigned long pfn); #endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */ diff --git a/trunk/mm/page_alloc.c b/trunk/mm/page_alloc.c index c3f6f851f76e..0a53728a12f5 100644 --- a/trunk/mm/page_alloc.c +++ b/trunk/mm/page_alloc.c @@ -3416,7 +3416,7 @@ void __init free_area_init_nodes(unsigned long *max_zone_pfn) * kernelcore=size sets the amount of memory for use for allocations that * cannot be reclaimed or migrated. */ -int __init cmdline_parse_kernelcore(char *p) +static int __init cmdline_parse_kernelcore(char *p) { unsigned long long coremem; if (!p) @@ -3430,6 +3430,9 @@ int __init cmdline_parse_kernelcore(char *p) return 0; } + +early_param("kernelcore", cmdline_parse_kernelcore); + #endif /* CONFIG_ARCH_POPULATES_NODE_MAP */ /**