Skip to content

use pinned_vm instead of locked_vm to account pinned pages

Daniel Jordan kvm kvm-ppc linux-fpga linux-mm linuxppc-dev lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 22 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5vfio/type1: use pinned_vm instead of locked_vm to account pinned pagesdrivers/vfio/vfio_iommu_type1.c+12 -197 replies
2/5vfio/spapr_tce: use pinned_vm instead of locked_vm to account pinned pagesDocumentation/vfio.txt drivers/vfio/vfio_iommu_spapr_tce.c+33 -376 replies
3/5fpga/dlf/afu: use pinned_vm instead of locked_vm to account pinned pagesdrivers/fpga/dfl-afu-dma-region.c+23 -270 replies
4/5powerpc/mmu: use pinned_vm instead of locked_vm to account pinned pagesarch/powerpc/mm/mmu_context_iommu.c+21 -220 replies
5/5kvm/book3s: use pinned_vm instead of locked_vm to account pinned pagesarch/powerpc/kvm/book3s_64_vio.c+15 -200 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] use pinned_vm instead of locked_vm to account pinned pages

Hi,

This series converts users that account pinned pages with locked_vm to account with pinned_vm instead, pinned_vm being the correct counter to use. It's based on a similar patch I posted recently[0].

The patches are based on rdma/for-next to build on Davidlohr Bueso's recent conversion of pinned_vm to an atomic64_t[1]. Seems to make some sense for these to be routed the same way, despite lack of rdma content?

All five of these places, and probably some of Davidlohr's conversions, probably want to be collapsed into a common helper in the core mm for accounting pinned pages. I tried, and there are several details that likely need discussion, so this can be done as a follow-on.

I'd appreciate a look at patch 5 especially since the accounting is unusual no matter whether locked_vm or pinned_vm are used.

On powerpc, this was cross-compile tested only.

[0] http://lkml.kernel.org/r/[email protected]
[1] http://lkml.kernel.org/r/[email protected]

Daniel Jordan (5):
vfio/type1: use pinned_vm instead of locked_vm to account pinned pages vfio/spapr_tce: use pinned_vm instead of locked_vm to account pinned
pages
fpga/dlf/afu: use pinned_vm instead of locked_vm to account pinned
pages
powerpc/mmu: use pinned_vm instead of locked_vm to account pinned
pages
kvm/book3s: use pinned_vm instead of locked_vm to account pinned pages

 Documentation/vfio.txt              |  6 +--
 arch/powerpc/kvm/book3s_64_vio.c    | 35 +++++++---------
 arch/powerpc/mm/mmu_context_iommu.c | 43 ++++++++++---------
 drivers/fpga/dfl-afu-dma-region.c   | 50 +++++++++++-----------
 drivers/vfio/vfio_iommu_spapr_tce.c | 64 ++++++++++++++---------------
 drivers/vfio/vfio_iommu_type1.c     | 31 ++++++--------
 6 files changed, 104 insertions(+), 125 deletions(-)
Signature · 1 line
2.20.1