android_kernel_xiaomi_sm8350/drivers/infiniband/core
Christoph Lameter bc3e53f682 mm: distinguish between mlocked and pinned pages
Some kernel components pin user space memory (infiniband and perf) (by
increasing the page count) and account that memory as "mlocked".

The difference between mlocking and pinning is:

A. mlocked pages are marked with PG_mlocked and are exempt from
   swapping. Page migration may move them around though.
   They are kept on a special LRU list.

B. Pinned pages cannot be moved because something needs to
   directly access physical memory. They may not be on any
   LRU list.

I recently saw an mlockalled process where mm->locked_vm became
bigger than the virtual size of the process (!) because some
memory was accounted for twice:

Once when the page was mlocked and once when the Infiniband
layer increased the refcount because it needt to pin the RDMA
memory.

This patch introduces a separate counter for pinned pages and
accounts them seperately.

Signed-off-by: Christoph Lameter <cl@linux.com>
Cc: Mike Marciniszyn <infinipath@qlogic.com>
Cc: Roland Dreier <roland@kernel.org>
Cc: Sean Hefty <sean.hefty@intel.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-10-31 17:30:46 -07:00
..
addr.c net: Abstract dst->neighbour accesses behind helpers. 2011-07-17 23:11:35 -07:00
agent.c
agent.h
cache.c IB/core: Add GID change event 2011-07-18 21:04:30 -07:00
cm_msgs.h
cm.c RDMA: Check for NULL mode in .devnode methods 2011-07-04 15:53:28 -07:00
cma.c RDMA/cma: Don't allow IPoIB port space for IBoE 2011-07-18 16:50:25 -07:00
core_priv.h
device.c RDMA: Allow for NULL .modify_device() and .modify_port() methods 2011-07-18 16:44:30 -07:00
fmr_pool.c
iwcm.c
iwcm.h
mad_priv.h
mad_rmpp.c
mad_rmpp.h
mad.c IB/mad: Return EPROTONOSUPPORT when an RDMA device lacks the QP required 2011-05-23 11:15:48 -07:00
Makefile RDMA: Add netlink infrastructure 2011-05-20 11:46:11 -07:00
multicast.c
netlink.c rtnetlink: Compute and store minimum ifinfo dump size 2011-06-09 20:38:07 -07:00
packer.c
sa_query.c
sa.h
smi.c
smi.h
sysfs.c
ucm.c
ucma.c Merge branches 'cma', 'cxgb3', 'cxgb4', 'misc', 'nes', 'netlink', 'srp' and 'uverbs' into for-next 2011-05-25 13:47:20 -07:00
ud_header.c
umem.c mm: distinguish between mlocked and pinned pages 2011-10-31 17:30:46 -07:00
user_mad.c IB: Add devnode methods to cm_class and umad_class 2011-05-23 11:24:28 -07:00
uverbs_cmd.c
uverbs_main.c RDMA: Check for NULL mode in .devnode methods 2011-07-04 15:53:28 -07:00
uverbs_marshall.c
uverbs.h
verbs.c