Skip to content

Add support for SVM atomics in Nouveau

Alistair Popple dri-devel linux-doc linux-mm lkml nouveau 11 versions – Applied

Status from this message: [merged] nouveau-svm-implement-atomic-svm-access.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest10 patches 3 repliesApplied 10/10
  2. v1010 patches 16 repliesSuperseded
  3. v910 patches 29 repliesSuperseded
Earlier versions · 8
VersionPostedPatchesRepliesStatus
v88 patches33 repliesSuperseded
v78 patches22 repliesSuperseded
v68 patches7 repliesSuperseded
v58 patches2 repliesSuperseded
v48 patches7 repliesSuperseded
v38 patches23 repliesSuperseded
v24 patches4 repliesSuperseded
v19 patches17 repliesSuperseded

Patches in v11 All 10 applied

#Subject and filesSizeRepliesApplied
1/10mm: Remove special swap entry functionsarch/s390/mm/pgtable.c fs/proc/task_mmu.c include/linux/swap.h +7 more+51 -820 repliesApplied
2/10mm/swapops: Rework swap entry manipulation codeinclude/linux/swapops.h mm/debug_vm_pgtable.c mm/hmm.c +6 more+100 -620 repliesApplied
3/10mm/rmap: Split try_to_munlock from try_to_unmapDocumentation/vm/unevictable-lru.rst include/linux/rmap.h mm/mlock.c +1 more+69 -450 repliesApplied
4/10mm/rmap: Split migration into its own functioninclude/linux/rmap.h mm/huge_memory.c mm/migrate.c +1 more+289 -1070 repliesApplied
5/10mm: Rename migrate_pgmap_ownerDocumentation/vm/hmm.rst drivers/gpu/drm/nouveau/nouveau_svm.c include/linux/mmu_notifier.h +2 more+18 -180 repliesApplied
6/10mm/memory.c: Allow different return codes for copy_nonpresent_pte()mm/memory.c+17 -110 repliesApplied
7/10mm: Device exclusive memory accessDocumentation/vm/hmm.rst include/linux/mmu_notifier.h include/linux/rmap.h +7 more+402 -100 repliesApplied
8/10mm: Selftests for exclusive device memorylib/test_hmm.c lib/test_hmm_uapi.h tools/testing/selftests/vm/hmm-tests.c+285 -00 repliesApplied
9/10nouveau/svm: Refactor nouveau_range_faultdrivers/gpu/drm/nouveau/nouveau_svm.c+20 -140 repliesApplied
10/10nouveau/svm: Implement atomic SVM accessdrivers/gpu/drm/nouveau/include/nvif/if000c.h drivers/gpu/drm/nouveau/nouveau_svm.c drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h +1 more+123 -110 repliesApplied

Reviews trailers per patch

All 10 patches have a Reviewed-by or Acked-by.

PatchRalph CampbellChristoph HellwigJason GunthorpePeter XuBen Skeggs
1/10R-b R-b
2/10R-b R-b R-b
3/10R-b R-b
4/10R-b R-b
5/10R-b
6/10R-b
7/10R-b
8/10T-b R-b A-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 5 reviewers.

Read the v11 thread

Cover letter [PATCH v11 00/10] Add support for SVM atomics in Nouveau

Hi Andrew,

This is my series to add support for SVM atomics in Nouveau rebased onto v5.13-rc6-mmots-2021-06-15-20-28. Functionally there are no changes from the previous v10, however some changes were made during the rebase. If anyone would like to see a diff-of-diffs I can post it but my exhaustive (assuming I didn't miss anything in the diff-of-diff) summary below is probably easier to read.

Hugh - based on our previous disscussion I'm reasonably confident I haven't missed anything from you in the rebase, but patch 4 ("Split migration into its own function") might be worth looking at as that contained the largest conflicts. Thanks.

[PATCH 01/10] mm: Remove special swap entry functions

- Fixed migration_entry_to_page() reference in __split_huge_pmd_locked() introduced by Hugh's "mm/thp: fix __split_huge_pmd_locked() on shmem migration entry".

- Fixed migration_entry_to_page() reference in page_vma_mapped_walk() changed by Hugh in "mm: page_vma_mapped_walk(): prettify PVMW_MIGRATION block"

[PATCH 02/10] mm/swapops: Rework swap entry manipulation code

- No changes required.

[PATCH 03/10] mm/rmap: Split try_to_munlock from try_to_unmap

- No changes required.

[PATCH 04/10] mm/rmap: Split migration into its own function

- Updated try_to_migrate_one() and try_to_migrate() to accept TTU_SYNC flag.

- Updated mmu notifier range calculation in try_to_migrate_one() to use vma_address_end() introduced by Hugh in "mm/thp: fix vma_address() if virtual address below file offset".

- Update to unmap_page() in mm/hugh_memory.c to pass TTU_SYNC and check page_mapped() now that try_to_{unmap|migrate} return void.

[PATCH 05/10] mm: Rename migrate_pgmap_owner

- Added Peter's Reviewed-by.

[PATCH 06/10] mm/memory.c: Allow different return codes for copy_non_present_pte()

- Updated call to copy_nonpresent_pte() for extra arguments added by Peter in "mm/userfaultfd: fix uffd-wp special cases for fork()".

- Added Peter's Reviewed-by.

[PATCH 07/10] mm: Device exclusive memory access

- s/vma/src_vma/ in copy_nonpresent_pte() due to "mm/userfaultfd: fix uffd-wp special cases for fork()".

- Skip calling rmap_walk on tail pages.

[PATCH 08/10] mm: Selftests for exclusive device memory

- Squashed in a fix from Colin King (see
https://lore.kernel.org/kernel-janitors/[email protected]/).
Not sure what the best way of attributing that is though given it was against next.

[PATCH 09/10] nouveau/svm: Refactor nouveau_range_fault

- No changes.

[PATCH 10/10] nouveau/svm: Implement atomic SVM access

- No changes.

Alistair Popple (10):
mm: Remove special swap entry functions
mm/swapops: Rework swap entry manipulation code
mm/rmap: Split try_to_munlock from try_to_unmap
mm/rmap: Split migration into its own function
mm: Rename migrate_pgmap_owner
mm/memory.c: Allow different return codes for copy_nonpresent_pte()
mm: Device exclusive memory access
mm: Selftests for exclusive device memory
nouveau/svm: Refactor nouveau_range_fault
nouveau/svm: Implement atomic SVM access

 Documentation/vm/hmm.rst                      |  19 +-
 Documentation/vm/unevictable-lru.rst          |  33 +-
 arch/s390/mm/pgtable.c                        |   2 +-
 drivers/gpu/drm/nouveau/include/nvif/if000c.h |   1 +
 drivers/gpu/drm/nouveau/nouveau_svm.c         | 156 ++++-
 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h |   1 +
 .../drm/nouveau/nvkm/subdev/mmu/vmmgp100.c    |   6 +
 fs/proc/task_mmu.c                            |  23 +-
 include/linux/mmu_notifier.h                  |  26 +-
 include/linux/rmap.h                          |  11 +-
 include/linux/swap.h                          |  13 +-
 include/linux/swapops.h                       | 123 ++--
 lib/test_hmm.c                                | 127 +++-
 lib/test_hmm_uapi.h                           |   2 +
 mm/debug_vm_pgtable.c                         |  12 +-
 mm/hmm.c                                      |  12 +-
 mm/huge_memory.c                              |  48 +-
 mm/hugetlb.c                                  |  10 +-
 mm/memcontrol.c                               |   2 +-
 mm/memory.c                                   | 175 ++++-
 mm/migrate.c                                  |  51 +-
 mm/mlock.c                                    |  12 +-
 mm/mprotect.c                                 |  18 +-
 mm/page_vma_mapped.c                          |  15 +-
 mm/rmap.c                                     | 612 +++++++++++++++---
 tools/testing/selftests/vm/hmm-tests.c        | 158 +++++
 26 files changed, 1341 insertions(+), 327 deletions(-)
Signature · 1 line
2.20.1