linux/include
Davidlohr Bueso 70f8a3ca68 mm: make mm->pinned_vm an atomic64 counter
Taking a sleeping lock to _only_ increment a variable is quite the
overkill, and pretty much all users do this. Furthermore, some drivers
(ie: infiniband and scif) that need pinned semantics can go to quite
some trouble to actually delay via workqueue (un)accounting for pinned
pages when not possible to acquire it.

By making the counter atomic we no longer need to hold the mmap_sem and
can simply some code around it for pinned_vm users. The counter is 64-bit
such that we need not worry about overflows such as rdma user input
controlled from userspace.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Christoph Lameter <cl@linux.com>
Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2019-02-07 12:54:02 -07:00
..
acpi Merge branch 'x86-cleanups-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-12-26 17:03:51 -08:00
asm-generic Merge branch 'akpm' (patches from Andrew) 2019-01-05 09:16:18 -08:00
clocksource
crypto crypto: skcipher - remove remnants of internal IV generators 2018-12-23 11:52:45 +08:00
drm Merge tag 'drm-intel-fixes-2019-01-11' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes 2019-01-11 10:26:21 +01:00
dt-bindings Mostly driver fixes, but there's a core framework fix in here too. 2019-01-31 23:22:57 -08:00
keys
kvm
linux mm: make mm->pinned_vm an atomic64 counter 2019-02-07 12:54:02 -07:00
math-emu
media media fixes for v4.20-rc8 2018-12-25 13:11:30 -08:00
memory
misc
net net: tls: Save iv in tls_rec for async crypto requests 2019-01-28 23:05:55 -08:00
pcmcia
ras
rdma RDMA/iwpm: move kdoc comments to functions 2019-02-05 15:40:41 -07:00
scsi 4.21 merge window pull request 2018-12-28 14:57:10 -08:00
soc ARM: SoC driver updates 2018-12-31 17:32:35 -08:00
sound ASoC: Fixes for v5.0 2019-01-18 15:17:17 +01:00
target
trace afs: Fix race in async call refcounting 2019-01-17 15:17:28 +00:00
uapi RDMA/cma: Remove CM_ID statistics provided by rdma-cm module 2019-02-05 15:30:33 -07:00
video
xen arm64/xen: fix xen-swiotlb cache flushing 2019-01-23 22:14:56 +01:00