linux/drivers/infiniband/hw
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
..
amso1100 net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
cxgb3 Merge branch 'master' of github.com:davem330/net 2011-10-07 13:38:43 -04:00
cxgb4 chelsio: Move the Chelsio drivers 2011-08-10 19:54:52 -07:00
ehca atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
ipath mm: distinguish between mlocked and pinned pages 2011-10-31 17:30:46 -07:00
mlx4 mlx4: Fix infiniband Kconfig dependencies. 2011-08-11 23:05:05 -07:00
mthca IB/mthca: Remove unnecessary read of PCI_CAP_ID_EXP 2011-07-18 12:01:22 -07:00
nes net: add skb frag size accessors 2011-10-19 03:10:46 -04:00
qib mm: distinguish between mlocked and pinned pages 2011-10-31 17:30:46 -07:00