alistair23-linux/include
Eric B Munson de60f5f10c mm: introduce VM_LOCKONFAULT
The cost of faulting in all memory to be locked can be very high when
working with large mappings.  If only portions of the mapping will be used
this can incur a high penalty for locking.

For the example of a large file, this is the usage pattern for a large
statical language model (probably applies to other statical or graphical
models as well).  For the security example, any application transacting in
data that cannot be swapped out (credit card data, medical records, etc).

This patch introduces the ability to request that pages are not
pre-faulted, but are placed on the unevictable LRU when they are finally
faulted in.  The VM_LOCKONFAULT flag will be used together with VM_LOCKED
and has no effect when set without VM_LOCKED.  Setting the VM_LOCKONFAULT
flag for a VMA will cause pages faulted into that VMA to be added to the
unevictable LRU when they are faulted or if they are already present, but
will not cause any missing pages to be faulted in.

Exposing this new lock state means that we cannot overload the meaning of
the FOLL_POPULATE flag any longer.  Prior to this patch it was used to
mean that the VMA for a fault was locked.  This means we need the new
FOLL_MLOCK flag to communicate the locked state of a VMA.  FOLL_POPULATE
will now only control if the VMA should be populated and in the case of
VM_LOCKONFAULT, it will not be set.

Signed-off-by: Eric B Munson <emunson@akamai.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Shuah Khan <shuahkh@osg.samsung.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-11-05 19:34:48 -08:00
..
acpi Merge branch 'acpi-processor' 2015-11-02 00:50:37 +01:00
asm-generic Power management and ACPI updates for v4.4-rc1 2015-11-04 18:10:13 -08:00
clocksource
crypto crypto: ahash - Add crypto_ahash_blocksize 2015-10-20 22:10:48 +08:00
drm drm/dp/mst: make mst i2c transfer code more robust. 2015-10-15 09:06:20 +10:00
dt-bindings char/misc drivers for 4.4-rc1 2015-11-04 22:15:15 -08:00
keys
kvm arm/arm64: KVM: Only allow 64bit hosts to build VGICv3 2015-10-09 23:11:57 +01:00
linux mm: introduce VM_LOCKONFAULT 2015-11-05 19:34:48 -08:00
math-emu
media media updates for v4.3-rc1 2015-09-11 16:42:39 -07:00
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-11-03 13:41:45 -05:00
pcmcia
ras
rdma Changes for 4.3-rc1 2015-09-19 20:04:11 -07:00
rxrpc
scsi Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-09-11 19:00:42 -07:00
soc IOMMU Updates for Linux v4.3 2015-09-08 17:22:35 -07:00
sound Merge remote-tracking branches 'asoc/fix/rt298', 'asoc/fix/sx', 'asoc/fix/wm8904' and 'asoc/fix/wm8962' into asoc-linus 2015-10-23 08:44:14 +09:00
target target: Propigate backend read-only to core_tpg_add_lun 2015-09-24 23:17:21 -07:00
trace mm, compaction: distinguish contended status in tracepoints 2015-11-05 19:34:48 -08:00
uapi mm: mlock: add new mlock system call 2015-11-05 19:34:48 -08:00
video libnvdimm for 4.3: 2015-09-08 14:35:59 -07:00
xen xen/grant-table: Add an helper to iterate over a specific number of grants 2015-10-23 14:20:46 +01:00
Kbuild