diff options
author | Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> | 2013-09-11 17:22:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-11 18:57:49 -0400 |
commit | 86cdb465cf3a9d81058b517af05074157fa9dcdd (patch) | |
tree | 47b1dcb170c81cd7afd0341123dcd39c8623385d /Documentation/sysctl/vm.txt | |
parent | 83467efbdb7948146581a56cbd683a22a0684bbb (diff) |
mm: prepare to remove /proc/sys/vm/hugepages_treat_as_movable
Now hugepage migration is enabled, although restricted on pmd-based
hugepages for now (due to lack of testing.) So we should allocate
migratable hugepages from ZONE_MOVABLE if possible.
This patch makes GFP flags in hugepage allocation dependent on migration
support, not only the value of hugepages_treat_as_movable. It provides no
change on the behavior for architectures which do not support hugepage
migration,
Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Rik van Riel <riel@redhat.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/sysctl/vm.txt')
-rw-r--r-- | Documentation/sysctl/vm.txt | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index 36ecc26c7433..79a797eb3e87 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -200,17 +200,25 @@ fragmentation index is <= extfrag_threshold. The default value is 500. | |||
200 | 200 | ||
201 | hugepages_treat_as_movable | 201 | hugepages_treat_as_movable |
202 | 202 | ||
203 | This parameter is only useful when kernelcore= is specified at boot time to | 203 | This parameter controls whether we can allocate hugepages from ZONE_MOVABLE |
204 | create ZONE_MOVABLE for pages that may be reclaimed or migrated. Huge pages | 204 | or not. If set to non-zero, hugepages can be allocated from ZONE_MOVABLE. |
205 | are not movable so are not normally allocated from ZONE_MOVABLE. A non-zero | 205 | ZONE_MOVABLE is created when kernel boot parameter kernelcore= is specified, |
206 | value written to hugepages_treat_as_movable allows huge pages to be allocated | 206 | so this parameter has no effect if used without kernelcore=. |
207 | from ZONE_MOVABLE. | 207 | |
208 | 208 | Hugepage migration is now available in some situations which depend on the | |
209 | Once enabled, the ZONE_MOVABLE is treated as an area of memory the huge | 209 | architecture and/or the hugepage size. If a hugepage supports migration, |
210 | pages pool can easily grow or shrink within. Assuming that applications are | 210 | allocation from ZONE_MOVABLE is always enabled for the hugepage regardless |
211 | not running that mlock() a lot of memory, it is likely the huge pages pool | 211 | of the value of this parameter. |
212 | can grow to the size of ZONE_MOVABLE by repeatedly entering the desired value | 212 | IOW, this parameter affects only non-migratable hugepages. |
213 | into nr_hugepages and triggering page reclaim. | 213 | |
214 | Assuming that hugepages are not migratable in your system, one usecase of | ||
215 | this parameter is that users can make hugepage pool more extensible by | ||
216 | enabling the allocation from ZONE_MOVABLE. This is because on ZONE_MOVABLE | ||
217 | page reclaim/migration/compaction work more and you can get contiguous | ||
218 | memory more likely. Note that using ZONE_MOVABLE for non-migratable | ||
219 | hugepages can do harm to other features like memory hotremove (because | ||
220 | memory hotremove expects that memory blocks on ZONE_MOVABLE are always | ||
221 | removable,) so it's a trade-off responsible for the users. | ||
214 | 222 | ||
215 | ============================================================== | 223 | ============================================================== |
216 | 224 | ||