public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] Alter NOMMU mmap handling [ver #3]
@ 2009-01-08 12:53 David Howells
  2009-01-08 12:53 ` [PATCH 01/10] NOMMU: Fix cleanup handling in ramfs_nommu_get_umapped_area() " David Howells
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: David Howells @ 2009-01-08 12:53 UTC (permalink / raw)
  To: torvalds, akpm
  Cc: bernds_cb1, dhowells, rgetz, vapier.adi, lethal, linux-kernel


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
linkage blocks.

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
     mmap.

 (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
change:

 (*) 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
     values computed.

 (*) 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
     cache.


The patches can be obtained as a tarball from:

	http://people.redhat.com/~dhowells/nommu-permmvmas.tar.bz2

And are available by GIT from:

	git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-2.6-nommu.git

These patches have been tested on FRV, Blackfin and SH.

David

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-01-13 10:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-08 12:53 [PATCH 00/10] Alter NOMMU mmap handling [ver #3] David Howells
2009-01-08 12:53 ` [PATCH 01/10] NOMMU: Fix cleanup handling in ramfs_nommu_get_umapped_area() " David Howells
2009-01-08 12:53 ` [PATCH 02/10] NOMMU: Rename ARM's struct vm_region " David Howells
2009-01-08 12:54 ` [PATCH 03/10] NOMMU: Delete askedalloc and realalloc variables " David Howells
2009-01-08 12:54 ` [PATCH 04/10] NOMMU: Make VMAs per MM as for MMU-mode linux " David Howells
2009-01-13  7:55   ` Andrew Morton
2009-01-13 10:51     ` David Howells
2009-01-08 12:54 ` [PATCH 05/10] NOMMU: Make mmap allocation page trimming behaviour configurable. " David Howells
2009-01-08 12:54 ` [PATCH 06/10] NOMMU: Improve procfs output using per-MM VMAs " David Howells
2009-01-08 12:54 ` [PATCH 07/10] FDPIC: Don't attempt to expand the userspace stack to fill the space allocated " David Howells
2009-01-08 12:54 ` [PATCH 08/10] FLAT: " David Howells
2009-01-08 12:54 ` [PATCH 09/10] NOMMU: Teach kobjsize() about VMA regions. " David Howells
2009-01-08 12:54 ` [PATCH 10/10] NOMMU: Support XIP on initramfs " David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox