On Fri, May 03, 2019 at 01:16:30PM -0700, Daniel Jordan wrote: > locked_vm accounting is done roughly the same way in five places, so > unify them in a helper. Standardize the debug prints, which vary > slightly. Error codes stay the same, so user-visible behavior does too. > > Signed-off-by: Daniel Jordan <daniel.m.jor...@oracle.com> > Cc: Alan Tull <at...@kernel.org> > Cc: Alexey Kardashevskiy <a...@ozlabs.ru> > Cc: Alex Williamson <alex.william...@redhat.com> > Cc: Andrew Morton <a...@linux-foundation.org> > Cc: Benjamin Herrenschmidt <b...@kernel.crashing.org> > Cc: Christoph Lameter <c...@linux.com> > Cc: Christophe Leroy <christophe.le...@c-s.fr> > Cc: Davidlohr Bueso <d...@stgolabs.net> > Cc: Jason Gunthorpe <j...@mellanox.com> > Cc: Mark Rutland <mark.rutl...@arm.com> > Cc: Michael Ellerman <m...@ellerman.id.au> > Cc: Moritz Fischer <m...@kernel.org> > Cc: Paul Mackerras <pau...@ozlabs.org> > Cc: Steve Sistare <steven.sist...@oracle.com> > Cc: Wu Hao <hao...@intel.com> > Cc: linux...@kvack.org > Cc: k...@vger.kernel.org > Cc: kvm-...@vger.kernel.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-f...@vger.kernel.org > Cc: linux-ker...@vger.kernel.org > > Based on v5.1-rc7. Tested with the vfio type1 driver. Any feedback > welcome. > > Andrew, this one patch replaces these six from [1]: > > mm-change-locked_vms-type-from-unsigned-long-to-atomic64_t.patch > vfio-type1-drop-mmap_sem-now-that-locked_vm-is-atomic.patch > vfio-spapr_tce-drop-mmap_sem-now-that-locked_vm-is-atomic.patch > fpga-dlf-afu-drop-mmap_sem-now-that-locked_vm-is-atomic.patch > kvm-book3s-drop-mmap_sem-now-that-locked_vm-is-atomic.patch > powerpc-mmu-drop-mmap_sem-now-that-locked_vm-is-atomic.patch > > That series converts locked_vm to an atomic, but on closer inspection causes > at > least one accounting race in mremap, and fixing it just for this type > conversion came with too much ugly in the core mm to justify, especially when > the right long-term fix is making these drivers use pinned_vm instead.
Did we ever decide what to do here? Should all these drivers be switched to pinned_vm anyhow? Jason