|| ||David Howells <email@example.com>|
|| ||firstname.lastname@example.org, email@example.com|
|| ||[PATCH 00/10] Alter NOMMU mmap handling [ver #3]|
|| ||Thu, 08 Jan 2009 12:53:46 +0000|
|| ||firstname.lastname@example.org, email@example.com,
|| ||Article, Thread
The primary change made by the attached patches alters the NOMMU mmap code so
that VMAs are per-MM rather than being a shared resource with separate per-MM
This solves two problems:
(1) In SYSV SHM where nattch for a segment does not reflect the number of
shmat's (and forks) done.
(2) In mmap() where the VMA's vm_mm is set to point to the parent mm by an
exec'ing process when VM_EXECUTABLE is specified, regardless of the fact
that a VMA might be shared and already have its vm_mm assigned to another
process or even a dead process.
And adds a number of features:
(3) Allocations are now made with alloc_pages() rather than kmalloc(). This
simplifies page accounting within a block of pages.
(4) Excess pages can be trimmed from allocations.
(5) VMAs are added for the parent MM's RB-tree and mmap lists, as for MMU-mode
(6) Non-anonymous VMAs can now be linked to the inode as for MMU-mode.
(7) mmaps can now be partially unmapped under some circumstances.
(8) Simplified coredumping in ELF-FDPIC.
(9) /proc/meminfo has a line "MmapCopy" that indicates the amount of private
copying mmap() has done.
There are some patches with secondary changes that do not relate to the primary
(*) Ramfs needs to clean up correctly in the case where its get_unmapped_area
call gets fewer pages from find_get_pages() than were asked for.
(*) The askedalloc and realalloc variables are removed as nothing uses the
(*) The ELF-FDPIC and FLAT binfmts no longer expand the stack segment to
consume the space that is allocated to them beyond what is asked for.
This removes some users of the contentious kobjsize().
An alternative method would be to to replace the call to kobjsize() with
something that uses the VMA list only.
(*) Fix kobjsize() to check the VMA list.
(*) Support XIP on initramfs under NOMMU conditions by pre-truncating the
ramfs files to get contiguous memory allocated in advance in the page
The patches can be obtained as a tarball from:
And are available by GIT from:
These patches have been tested on FRV, Blackfin and SH.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/