Skip to content

mm/hmm/nouveau: add PMD system memory mapping

Ralph Campbell linux-kselftest linux-mm linux-rdma lkml nouveau 2 versions – Applied

Status from this message: Applied to hmm.git.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 3 repliesApplied
  2. v25 patches 2 repliesSuperseded

Changes in v3 from the cover letter

Replaced the HMM_PFN_P[MU]D flags with hmm_pfn_to_map_order() to indicate the size of the CPU mapping.

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/5nouveau/hmm: fault one page at a timedrivers/gpu/drm/nouveau/nouveau_svm.c+66 -1330 replies
2/5mm/hmm: add hmm_mapping orderinclude/linux/hmm.h mm/hmm.c+33 -50 replies
3/5nouveau: fix mapping 2MB sysmem pagesdrivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c+84 -31 reply
4/5nouveau/hmm: support mapping large sysmem pagesdrivers/gpu/drm/nouveau/nouveau_svm.c+40 -130 replies
5/5hmm: add tests for hmm_pfn_to_map_order()lib/test_hmm.c lib/test_hmm_uapi.h tools/testing/selftests/vm/hmm-tests.c+84 -00 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/5] mm/hmm/nouveau: add PMD system memory mapping

The goal for this series is to introduce the hmm_pfn_to_map_order() function. This allows a device driver to know that a given 4K PFN is actually mapped by the CPU using a larger sized CPU page table entry and therefore the device driver can safely map system memory using larger device MMU PTEs.
The series is based on 5.8.0-rc3 and is intended for Jason Gunthorpe's hmm tree. These were originally part of a larger series:
https://lore.kernel.org/linux-mm/20200619215649.32297-1-rcampbell-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org/

Changes in v3:
Replaced the HMM_PFN_P[MU]D flags with hmm_pfn_to_map_order() to indicate the size of the CPU mapping.

Changes in v2:
Make the hmm_range_fault() API changes into a separate series and add
two output flags for PMD/PUD instead of a single compund page flag as suggested by Jason Gunthorpe.
Make the nouveau page table changes a separate patch as suggested by
Ben Skeggs.
Only add support for 2MB nouveau mappings initially since changing the 1:1 CPU/GPU page table size assumptions requires a bigger set of changes. Rebase to 5.8.0-rc3.

Ralph Campbell (5):
nouveau/hmm: fault one page at a time
mm/hmm: add hmm_mapping order
nouveau: fix mapping 2MB sysmem pages
nouveau/hmm: support mapping large sysmem pages
hmm: add tests for HMM_PFN_PMD flag

 drivers/gpu/drm/nouveau/nouveau_svm.c         | 236 ++++++++----------
 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c |   5 +-
 .../drm/nouveau/nvkm/subdev/mmu/vmmgp100.c    |  82 ++++++
 include/linux/hmm.h                           |  24 +-
 lib/test_hmm.c                                |   4 +
 lib/test_hmm_uapi.h                           |   4 +
 mm/hmm.c                                      |  14 +-
 tools/testing/selftests/vm/hmm-tests.c        |  76 ++++++
 8 files changed, 299 insertions(+), 146 deletions(-)
Signature · 1 line
2.20.1