diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 17:00:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-09 17:00:58 -0500 |
commit | c40f6f8bbc4cbd2902671aacd587400ddca62627 (patch) | |
tree | a991e5521e10943f4457fb7f494e00aec75cc7df /Documentation | |
parent | 1a7d0f0bec4be078ce2cfb11538c0f4ffbbed8e5 (diff) | |
parent | cb6ff208076b5f434db1b8c983429269d719cef5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-nommu
* git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-nommu:
NOMMU: Support XIP on initramfs
NOMMU: Teach kobjsize() about VMA regions.
FLAT: Don't attempt to expand the userspace stack to fill the space allocated
FDPIC: Don't attempt to expand the userspace stack to fill the space allocated
NOMMU: Improve procfs output using per-MM VMAs
NOMMU: Make mmap allocation page trimming behaviour configurable.
NOMMU: Make VMAs per MM as for MMU-mode linux
NOMMU: Delete askedalloc and realalloc variables
NOMMU: Rename ARM's struct vm_region
NOMMU: Fix cleanup handling in ramfs_nommu_get_umapped_area()
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/nommu-mmap.txt | 31 | ||||
-rw-r--r-- | Documentation/sysctl/vm.txt | 18 |
2 files changed, 44 insertions, 5 deletions
diff --git a/Documentation/nommu-mmap.txt b/Documentation/nommu-mmap.txt index 7714f57caad5..b565e8279d13 100644 --- a/Documentation/nommu-mmap.txt +++ b/Documentation/nommu-mmap.txt | |||
@@ -109,12 +109,18 @@ and it's also much more restricted in the latter case: | |||
109 | FURTHER NOTES ON NO-MMU MMAP | 109 | FURTHER NOTES ON NO-MMU MMAP |
110 | ============================ | 110 | ============================ |
111 | 111 | ||
112 | (*) A request for a private mapping of less than a page in size may not return | 112 | (*) A request for a private mapping of a file may return a buffer that is not |
113 | a page-aligned buffer. This is because the kernel calls kmalloc() to | 113 | page-aligned. This is because XIP may take place, and the data may not be |
114 | allocate the buffer, not get_free_page(). | 114 | paged aligned in the backing store. |
115 | 115 | ||
116 | (*) A list of all the mappings on the system is visible through /proc/maps in | 116 | (*) A request for an anonymous mapping will always be page aligned. If |
117 | no-MMU mode. | 117 | possible the size of the request should be a power of two otherwise some |
118 | of the space may be wasted as the kernel must allocate a power-of-2 | ||
119 | granule but will only discard the excess if appropriately configured as | ||
120 | this has an effect on fragmentation. | ||
121 | |||
122 | (*) A list of all the private copy and anonymous mappings on the system is | ||
123 | visible through /proc/maps in no-MMU mode. | ||
118 | 124 | ||
119 | (*) A list of all the mappings in use by a process is visible through | 125 | (*) A list of all the mappings in use by a process is visible through |
120 | /proc/<pid>/maps in no-MMU mode. | 126 | /proc/<pid>/maps in no-MMU mode. |
@@ -242,3 +248,18 @@ PROVIDING SHAREABLE BLOCK DEVICE SUPPORT | |||
242 | Provision of shared mappings on block device files is exactly the same as for | 248 | Provision of shared mappings on block device files is exactly the same as for |
243 | character devices. If there isn't a real device underneath, then the driver | 249 | character devices. If there isn't a real device underneath, then the driver |
244 | should allocate sufficient contiguous memory to honour any supported mapping. | 250 | should allocate sufficient contiguous memory to honour any supported mapping. |
251 | |||
252 | |||
253 | ================================= | ||
254 | ADJUSTING PAGE TRIMMING BEHAVIOUR | ||
255 | ================================= | ||
256 | |||
257 | NOMMU mmap automatically rounds up to the nearest power-of-2 number of pages | ||
258 | when performing an allocation. This can have adverse effects on memory | ||
259 | fragmentation, and as such, is left configurable. The default behaviour is to | ||
260 | aggressively trim allocations and discard any excess pages back in to the page | ||
261 | allocator. In order to retain finer-grained control over fragmentation, this | ||
262 | behaviour can either be disabled completely, or bumped up to a higher page | ||
263 | watermark where trimming begins. | ||
264 | |||
265 | Page trimming behaviour is configurable via the sysctl `vm.nr_trim_pages'. | ||
diff --git a/Documentation/sysctl/vm.txt b/Documentation/sysctl/vm.txt index cd05994a49e6..a3415070bcac 100644 --- a/Documentation/sysctl/vm.txt +++ b/Documentation/sysctl/vm.txt | |||
@@ -38,6 +38,7 @@ Currently, these files are in /proc/sys/vm: | |||
38 | - numa_zonelist_order | 38 | - numa_zonelist_order |
39 | - nr_hugepages | 39 | - nr_hugepages |
40 | - nr_overcommit_hugepages | 40 | - nr_overcommit_hugepages |
41 | - nr_trim_pages (only if CONFIG_MMU=n) | ||
41 | 42 | ||
42 | ============================================================== | 43 | ============================================================== |
43 | 44 | ||
@@ -348,3 +349,20 @@ Change the maximum size of the hugepage pool. The maximum is | |||
348 | nr_hugepages + nr_overcommit_hugepages. | 349 | nr_hugepages + nr_overcommit_hugepages. |
349 | 350 | ||
350 | See Documentation/vm/hugetlbpage.txt | 351 | See Documentation/vm/hugetlbpage.txt |
352 | |||
353 | ============================================================== | ||
354 | |||
355 | nr_trim_pages | ||
356 | |||
357 | This is available only on NOMMU kernels. | ||
358 | |||
359 | This value adjusts the excess page trimming behaviour of power-of-2 aligned | ||
360 | NOMMU mmap allocations. | ||
361 | |||
362 | A value of 0 disables trimming of allocations entirely, while a value of 1 | ||
363 | trims excess pages aggressively. Any value >= 1 acts as the watermark where | ||
364 | trimming of allocations is initiated. | ||
365 | |||
366 | The default value is 1. | ||
367 | |||
368 | See Documentation/nommu-mmap.txt for more information. | ||