linux/drivers
Konstantin Khlebnikov 314e51b985 mm: kill vma flag VM_RESERVED and mm->reserved_vm counter
A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
currently it lost original meaning but still has some effects:

 | effect                 | alternative flags
-+------------------------+---------------------------------------------
1| account as reserved_vm | VM_IO
2| skip in core dump      | VM_IO, VM_DONTDUMP
3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
4| do not mlock           | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP

This patch removes reserved_vm counter from mm_struct.  Seems like nobody
cares about it, it does not exported into userspace directly, it only
reduces total_vm showed in proc.

Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.

remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.

[akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Carsten Otte <cotte@de.ibm.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Eric Paris <eparis@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Morris <james.l.morris@oracle.com>
Cc: Jason Baron <jbaron@redhat.com>
Cc: Kentaro Takeda <takedakn@nttdata.co.jp>
Cc: Matt Helsley <matthltc@us.ibm.com>
Cc: Nick Piggin <npiggin@kernel.dk>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Cc: Venkatesh Pallipadi <venki@google.com>
Acked-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-09 16:22:19 +09:00
..
accessibility
acpi Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-10-08 07:14:06 +09:00
amba
ata SCSI for-linus on 20121002 2012-10-02 19:01:32 -07:00
atm sections: fix section conflicts in drivers/atm 2012-10-06 03:04:40 +09:00
auxdisplay
base firmware: use 'kernel_read()' to read firmware into kernel buffer 2012-10-04 09:19:02 -07:00
bcma bcma: change delays to follow timers-howto guide 2012-09-28 13:54:02 -04:00
block Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client 2012-10-08 06:38:18 +09:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
bus drivers: bus: omap_l3: fixup merge conflict resolution 2012-10-01 19:39:48 -07:00
cdrom
char mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
clk spi: Updates for v3.7 2012-10-02 17:26:42 -07:00
clocksource Power management updates for 3.7-rc1 2012-10-02 18:32:35 -07:00
connector Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
cpufreq Power management updates for 3.7-rc1 2012-10-02 18:32:35 -07:00
cpuidle
crypto ARM: soc: late platform updates 2012-10-07 20:55:16 +09:00
dca
devfreq
dio
dma Sound updates for 3.7-rc1 2012-10-09 07:07:14 +09:00
edac Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
eisa
extcon Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
firewire firewire: addendum to address handler RCU conversion 2012-09-28 11:47:42 +02:00
firmware
gpio ARM: soc: late platform updates 2012-10-07 20:55:16 +09:00
gpu mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
hid Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
hsi
hv
hwmon ARM: soc: late platform updates 2012-10-07 20:55:16 +09:00
hwspinlock
i2c Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-10-08 07:14:06 +09:00
ide sections: fix section conflicts in drivers/ide 2012-10-06 03:04:41 +09:00
idle intel_idle: enable IVB Xeon support 2012-09-26 22:28:21 -04:00
iio
infiniband mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
input Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-10-08 07:14:06 +09:00
iommu IOMMU Updates for Linux v3.7-rc1 2012-10-08 06:33:44 +09:00
irqchip
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00
leds MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
lguest Merge branch 'virtio-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-07 21:04:56 +09:00
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
md Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
media mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
memory memory: tegra{20,30}-mc: Fix reading incorrect register in mc_readl() 2012-09-26 14:04:09 -07:00
memstick
message
mfd 1. New drivers: 2012-10-07 17:29:24 +09:00
misc mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
mmc sections: fix section conflicts in drivers/mmc 2012-10-06 03:04:42 +09:00
mtd mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
net Second batch of changes for the 3.7 merge window: 2012-10-07 17:19:49 +09:00
nfc NFC: Fix missing mutex unlock in pn533_send_cmd_frame_async 2012-09-27 10:47:48 +02:00
nubus
of Devicetree updates for 3.7 2012-10-03 09:44:08 -07:00
oprofile mm: use mm->exe_file instead of first VM_EXECUTABLE vma->vm_file 2012-10-09 16:22:18 +09:00
parisc
parport
pci Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
pcmcia ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
pinctrl ARM: soc: late platform updates 2012-10-07 20:55:16 +09:00
platform Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-10-08 07:14:06 +09:00
pnp
power 1. New drivers: 2012-10-07 17:29:24 +09:00
pps idr: rename MAX_LEVEL to MAX_IDR_LEVEL 2012-10-06 03:04:56 +09:00
ps3
ptp
pwm MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
rapidio rapidio: add destination ID allocation mechanism 2012-10-06 03:05:23 +09:00
regulator MFD bits for the 3.7 merge window. 2012-10-05 12:01:30 +09:00
remoteproc Merge branch 'virtio-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-07 21:04:56 +09:00
rpmsg Merge branch 'virtio-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-07 21:04:56 +09:00
rtc Merge branch 'akpm' (Andrew's patch-bomb) 2012-10-06 03:09:16 +09:00
s390 Merge branch 'virtio-next' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux 2012-10-07 21:04:56 +09:00
sbus
scsi mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
sfi
sh ARM: soc: multiplatform enablement 2012-10-01 19:11:38 -07:00
sn
spi ARM: soc: late platform updates 2012-10-07 20:55:16 +09:00
ssb
staging mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
target Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-10-01 09:06:36 -07:00
tc
thermal idr: rename MAX_LEVEL to MAX_IDR_LEVEL 2012-10-06 03:04:56 +09:00
tty Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-10-06 03:16:12 +09:00
uio mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
usb mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
uwb
vfio switch simple cases of fget_light to fdget 2012-09-26 22:20:08 -04:00
vhost vhost_set_vring(): turn pollstart/pollstop into bool 2012-09-26 21:10:12 -04:00
video mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
virt
virtio virtio_mmio: Don't attempt to create empty virtqueues 2012-09-28 15:05:16 +09:30
vlynq
vme
w1 char/misc driver merge for 3.7-rc1 2012-10-01 12:09:59 -07:00
watchdog Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu 2012-10-07 21:06:10 +09:00
xen mm: kill vma flag VM_RESERVED and mm->reserved_vm counter 2012-10-09 16:22:19 +09:00
zorro
Kconfig ARM: soc: driver specific changes 2012-10-01 18:46:13 -07:00
Makefile Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-10-02 13:38:27 -07:00