diff options
author | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2009-02-02 20:40:55 +0100 |
---|---|---|
committer | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2009-02-02 20:40:55 +0100 |
commit | 8db0c5d5ef3ab99fe9e5151872b75f45c4282e3c (patch) | |
tree | da9759151e00221c58cdd9f4de893c0b08753670 /Documentation/nommu-mmap.txt | |
parent | jfs: Fix error handling in metapage_writepage() (diff) | |
parent | Merge branch 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/k... (diff) | |
download | linux-8db0c5d5ef3ab99fe9e5151872b75f45c4282e3c.tar.xz linux-8db0c5d5ef3ab99fe9e5151872b75f45c4282e3c.zip |
Merge branch 'master' of /home/shaggy/git/linus-clean/
Diffstat (limited to 'Documentation/nommu-mmap.txt')
-rw-r--r-- | Documentation/nommu-mmap.txt | 31 |
1 files changed, 26 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: FURTHER NOTES ON NO-MMU MMAP ============================ - (*) A request for a private mapping of less than a page in size may not return - a page-aligned buffer. This is because the kernel calls kmalloc() to - allocate the buffer, not get_free_page(). + (*) A request for a private mapping of a file may return a buffer that is not + page-aligned. This is because XIP may take place, and the data may not be + paged aligned in the backing store. - (*) A list of all the mappings on the system is visible through /proc/maps in - no-MMU mode. + (*) A request for an anonymous mapping will always be page aligned. If + possible the size of the request should be a power of two otherwise some + of the space may be wasted as the kernel must allocate a power-of-2 + granule but will only discard the excess if appropriately configured as + this has an effect on fragmentation. + + (*) A list of all the private copy and anonymous mappings on the system is + visible through /proc/maps in no-MMU mode. (*) A list of all the mappings in use by a process is visible through /proc/<pid>/maps in no-MMU mode. @@ -242,3 +248,18 @@ PROVIDING SHAREABLE BLOCK DEVICE SUPPORT Provision of shared mappings on block device files is exactly the same as for character devices. If there isn't a real device underneath, then the driver should allocate sufficient contiguous memory to honour any supported mapping. + + +================================= +ADJUSTING PAGE TRIMMING BEHAVIOUR +================================= + +NOMMU mmap automatically rounds up to the nearest power-of-2 number of pages +when performing an allocation. This can have adverse effects on memory +fragmentation, and as such, is left configurable. The default behaviour is to +aggressively trim allocations and discard any excess pages back in to the page +allocator. In order to retain finer-grained control over fragmentation, this +behaviour can either be disabled completely, or bumped up to a higher page +watermark where trimming begins. + +Page trimming behaviour is configurable via the sysctl `vm.nr_trim_pages'. |