kernel-ark/Documentation
David Howells 8feae13110 NOMMU: Make VMAs per MM as for MMU-mode linux
Make VMAs per mm_struct as for MMU-mode linux.  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 a dead process.

A new struct (vm_region) is introduced to track a mapped region and to remember
the circumstances under which it may be shared and the vm_list_struct structure
is discarded as it's no longer required.

This patch makes the following additional changes:

 (1) Regions are now allocated with alloc_pages() rather than kmalloc() and
     with no recourse to __GFP_COMP, so the pages are not composite.  Instead,
     each page has a reference on it held by the region.  Anything else that is
     interested in such a page will have to get a reference on it to retain it.
     When the pages are released due to unmapping, each page is passed to
     put_page() and will be freed when the page usage count reaches zero.

 (2) Excess pages are trimmed after an allocation as the allocation must be
     made as a power-of-2 quantity of pages.

 (3) VMAs are added to the parent MM's R/B tree and mmap lists.  As an MM may
     end up with overlapping VMAs within the tree, the VMA struct address is
     appended to the sort key.

 (4) Non-anonymous VMAs are now added to the backing inode's prio list.

 (5) Holes may be punched in anonymous VMAs with munmap(), releasing parts of
     the backing region.  The VMA and region structs will be split if
     necessary.

 (6) sys_shmdt() only releases one attachment to a SYSV IPC shared memory
     segment instead of all the attachments at that addresss.  Multiple
     shmat()'s return the same address under NOMMU-mode instead of different
     virtual addresses as under MMU-mode.

 (7) Core dumping for ELF-FDPIC requires fewer exceptions for NOMMU-mode.

 (8) /proc/maps is now the global list of mapped regions, and may list bits
     that aren't actually mapped anywhere.

 (9) /proc/meminfo gains a line (tagged "MmapCopy") that indicates the amount
     of RAM currently allocated by mmap to hold mappable regions that can't be
     mapped directly.  These are copies of the backing device or file if not
     anonymous.

These changes make NOMMU mode more similar to MMU mode.  The downside is that
NOMMU mode requires some extra memory to track things over NOMMU without this
patch (VMAs are no longer shared, and there are now region structs).

Signed-off-by: David Howells <dhowells@redhat.com>
Tested-by: Mike Frysinger <vapier.adi@gmail.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
2009-01-08 12:04:47 +00:00
..
ABI mm: show node to memory section relationship with symlinks in sysfs 2009-01-06 15:59:00 -08:00
accounting .gitignore updates 2008-10-30 11:38:45 -07:00
acpi ACPI: update debug parameter documentation 2008-11-07 21:45:29 -05:00
aoe
arm Merge branch 'for-rmk' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into devel 2008-12-29 18:08:11 +00:00
auxdisplay .gitignore updates 2008-10-30 11:38:45 -07:00
blackfin Blackfin arch: Add document about bfin-gpio 2009-01-07 23:14:38 +08:00
block Documentation: remove reference to ll_rw_blk.c and moved drivers/block/elevator.c 2008-12-29 08:28:43 +01:00
blockdev Create/use more directory structure in the Documentation/ tree. 2008-11-14 17:28:53 +00:00
cdrom
cgroups freezer_cg: disable writing freezer.state of root cgroup 2008-11-12 17:17:16 -08:00
connector .gitignore updates 2008-10-30 11:38:45 -07:00
console
controllers sched: add hierarchical accounting to cpu accounting controller 2008-11-11 12:13:28 +01:00
cpu-freq doc: Update sh cpufreq documentation. 2008-12-22 18:44:47 +09:00
cpuidle
cris
crypto
development-process
device-mapper
DocBook wimax: Makefile, Kconfig and docbook linkage for the stack 2009-01-07 10:00:17 -08:00
driver-model
dvb V4L/DVB (9812): [PATCH] short help for Technisat cards to select the right configuration 2008-12-30 09:38:35 -02:00
early-userspace
fault-injection
fb [ARM] pxafb: add support for overlay1 and overlay2 as framebuffer devices 2008-12-29 18:00:04 +08:00
filesystems Merge branch 'proc-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc 2009-01-07 12:01:06 -08:00
firmware_class
frv
hwmon Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6 2009-01-07 11:59:51 -08:00
i2c i2c: The i2c mailing list is moving 2008-10-30 15:55:47 +01:00
i2o
ia64 .gitignore updates 2008-10-30 11:38:45 -07:00
ide ide: update warm-plug HOWTO 2009-01-06 17:21:00 +01:00
infiniband
input Merge commit 'v2.6.28-rc9' into next 2008-12-20 04:54:54 -05:00
ioctl documentation: update header file paths 2009-01-06 15:59:28 -08:00
isdn Rationalise Randy's address a bit 2008-10-30 11:38:47 -07:00
ja_JP HOWTO: Sync patch for jp_JP/HOWTO 2008-10-29 15:03:50 -07:00
kbuild kbuild: fix typos (s/bin_shipped/bin.o_shipped/) in Documentation 2009-01-07 21:44:23 +01:00
kdump powerpc: Support for relocatable kdump kernel 2008-10-22 15:01:22 +11:00
ko_KR
laptops trivial: fix an -> a typos in documentation and comments 2009-01-06 11:28:07 +01:00
lguest lguest: move the initial guest page table creation code to the host 2008-12-30 09:26:11 +10:30
m68k
make
mips documentation: update header file paths 2009-01-06 15:59:28 -08:00
mn10300
mtd
namespaces
netlabel
networking trivial: fix an -> a typos in documentation and comments 2009-01-06 11:28:07 +01:00
parisc
PCI PCI: Add pci_clear_master() as opposite of pci_set_master() 2009-01-07 11:13:23 -08:00
pcmcia .gitignore updates 2008-10-30 11:38:45 -07:00
power
powerpc documentation: update header file paths 2009-01-06 15:59:28 -08:00
prctl
RCU Merge branch 'core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-30 16:10:19 -08:00
s390 documentation: update s390 header file paths 2009-01-06 15:59:28 -08:00
scheduler Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-12-28 12:27:58 -08:00
scsi trivial: Fix misspelling of "firmware" in docs for ncr53c8xx/sym53c8xx 2009-01-06 11:28:09 +01:00
serial Create/use more directory structure in the Documentation/ tree. 2008-11-14 17:28:53 +00:00
sh sh: Kill off remaining CONFIG_SH_KGDB bits. 2008-12-22 18:44:05 +09:00
sound Merge branch 'topic/oxygen' into to-push 2008-12-25 11:40:30 +01:00
sparc
spi hwmon: (lm70) Code streamlining and cleanup 2009-01-07 16:37:34 +01:00
sysctl mm: add dirty_background_bytes and dirty_bytes sysctls 2009-01-06 15:59:03 -08:00
telephony
thermal
timers
tracers tracing, doc: update mmiotrace documentation 2008-11-23 20:33:24 +01:00
uml
usb USB: add asynchronous autosuspend/autoresume support 2009-01-07 09:59:53 -08:00
video4linux V4L/DVB (10157): Add USB ID for the Sil4701 radio from DealExtreme 2009-01-02 17:13:56 -02:00
vm mm: remove try_to_munlock from vmscan 2009-01-06 15:59:03 -08:00
w1 hdq: documentation for OMAP HDQ 2008-11-12 17:17:18 -08:00
watchdog .gitignore updates 2008-10-30 11:38:45 -07:00
wimax i2400m: documentation and instructions for usage 2009-01-07 10:00:18 -08:00
x86 documentation: update header file paths 2009-01-06 15:59:28 -08:00
zh_CN
00-INDEX Merge branch 'doc-subdirs' of git://git.kernel.org/pub/scm/linux/kernel/git/rdunlap/linux-docs 2008-11-15 11:51:03 -08:00
applying-patches.txt
atomic_ops.txt
basic_profiling.txt
binfmt_misc.txt
braille-console.txt
bt8xxgpio.txt
BUG-HUNTING
c2port.txt Add c2 port support 2008-11-12 17:17:18 -08:00
cachetlb.txt
Changes
CodingStyle
cpu-hotplug.txt x86: use possible_cpus=NUM to extend the possible cpus allowed 2008-12-18 12:08:05 +01:00
cpu-load.txt
cpusets.txt container freezer: document the cgroup freezer subsystem. 2008-10-20 08:52:34 -07:00
cputopology.txt sysfs: add documentation to cputopology.txt for system cpumasks 2008-12-19 17:47:12 +10:30
credentials.txt CRED: Documentation 2008-11-14 10:39:26 +11:00
dcdbas.txt
debugging-modules.txt
debugging-via-ohci1394.txt
dell_rbu.txt trivial: fix an -> a typos in documentation and comments 2009-01-06 11:28:07 +01:00
devices.txt USB: add USB test and measurement class driver 2008-10-17 14:40:51 -07:00
DMA-API.txt DMA-API.txt: fix description of pci_map_sg/dma_map_sg scatterlists handling 2008-12-01 19:55:24 -08:00
DMA-attributes.txt
DMA-ISA-LPC.txt
DMA-mapping.txt documentation: update header file paths 2009-01-06 15:59:28 -08:00
dontdiff
edac.txt
eisa.txt
email-clients.txt Documentation/email-clients.txt: add some info about gmail 2008-11-06 15:41:19 -08:00
exception.txt
feature-removal-schedule.txt hwmon: Deprecate the fscher and fscpos drivers 2009-01-07 16:37:33 +01:00
ftrace.txt ftrace: improve documentation 2008-11-28 13:15:14 +01:00
gpio.txt
highuid.txt
HOWTO
hw_random.txt
ics932s401 ics932s401: new clock generator chip driver 2008-11-12 17:17:18 -08:00
initrd.txt
Intel-IOMMU.txt
io_ordering.txt
io-mapping.txt io mapping: improve documentation 2008-11-03 18:21:44 +01:00
IO-mapping.txt
iostats.txt
IPMI.txt
IRQ-affinity.txt
IRQ.txt
irqflags-tracing.txt
isapnp.txt
java.txt
kernel-doc-nano-HOWTO.txt documentation: how to use DOC: section blocks 2009-01-06 15:59:28 -08:00
kernel-docs.txt
kernel-parameters.txt Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-01-07 15:41:01 -08:00
keys-request-key.txt
keys.txt
kobject.txt kobject: Make Documentation/kobject.txt a little more coherent. 2009-01-06 10:44:32 -08:00
kprobes.txt kprobes: support probing module __exit function 2009-01-06 15:59:21 -08:00
kref.txt
ldm.txt
leds-class.txt
local_ops.txt documentation: local_ops fix on_each_cpu 2008-12-01 13:51:26 +01:00
lockdep-design.txt
lockstat.txt lockstat: contend with points 2008-10-20 15:43:10 +02:00
logo.gif
logo.txt
magic-number.txt documentation: update header file paths 2009-01-06 15:59:28 -08:00
Makefile
ManagementStyle docs: fix ManagementStyle book name 2008-10-30 11:38:46 -07:00
markers.txt markers: comment marker_synchronize_unregister() on data dependency 2008-11-28 16:47:41 +01:00
mca.txt
md.txt
memory-barriers.txt
memory-hotplug.txt mm: show node to memory section relationship with symlinks in sysfs 2009-01-06 15:59:00 -08:00
memory.txt
mono.txt
mutex-design.txt
nmi_watchdog.txt x86, nmi-watchdog: update procfs nmi_watchdog file documentation v2 2008-10-30 19:07:04 +01:00
nommu-mmap.txt NOMMU: Make VMAs per MM as for MMU-mode linux 2009-01-08 12:04:47 +00:00
numastat.txt
oops-tracing.txt
parport-lowlevel.txt
parport.txt
pi-futex.txt
pnp.txt
preempt-locking.txt
printk-formats.txt DOC: add printk-formats.txt 2008-11-12 17:17:17 -08:00
prio_tree.txt
rbtree.txt
rfkill.txt rfkill: add master_switch_mode and EPO lock to rfkill and rfkill-input 2008-10-31 19:00:09 -04:00
robust-futex-ABI.txt
robust-futexes.txt
rt-mutex-design.txt
rt-mutex.txt
rtc.txt
SAK.txt
SecurityBugs
SELinux.txt
serial-console.txt
sgi-ioc4.txt
sgi-visws.txt
SM501.txt
Smack.txt
sparse.txt
spinlocks.txt
stable_api_nonsense.txt
stable_kernel_rules.txt Update stable tree documentation 2008-10-29 15:03:49 -07:00
SubmitChecklist
SubmittingDrivers
SubmittingPatches
svga.txt
sysfs-rules.txt
sysrq.txt Merge branch 'v28-timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-10-20 13:19:56 -07:00
tracepoints.txt tracepoints: Documentation TPPROTO misspelt in Documentation/tracepoints.txt 2008-11-29 15:13:42 +01:00
unaligned-memory-access.txt
unicode.txt
unshare.txt
VGA-softcursor.txt
video-output.txt
volatile-considered-harmful.txt
voyager.txt
zorro.txt