linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Migrate device coherent pages on get_user_pages()
@ 2022-02-07  4:26 Alistair Popple
  2022-02-07  4:26 ` [PATCH v2 1/3] migrate.c: Remove vma check in migrate_vma_setup() Alistair Popple
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Alistair Popple @ 2022-02-07  4:26 UTC (permalink / raw)
  To: akpm, linux-mm
  Cc: Felix.Kuehling, rcampbell, linux-ext4, linux-xfs, amd-gfx,
	dri-devel, hch, jgg, jglisse, willy, alex.sierra, jhubbard,
	Alistair Popple

Device coherent pages represent memory on a coherently attached device such
as a GPU which is usually under the control of a driver. These pages should
not be pinned as the driver needs to be able to move pages as required.
Currently this is enforced by failing any attempt to pin a device coherent
page.

A similar problem exists for ZONE_MOVABLE pages. In that case though the
pages are migrated instead of causing failure. There is no reason the
kernel can't migrate device coherent pages so this series implements
migration for device coherent pages so the same strategy of migrate and pin
can be used.

This series depends on the series "Add MEMORY_DEVICE_COHERENT for coherent
device memory mapping"[1] which is in linux-next-20220204 and should apply
cleanly to that.

[1] - https://lore.kernel.org/linux-mm/20220128200825.8623-1-alex.sierra@amd.com/

Changes for v2:

 - Rebased on to linux-next-20220204

Alex Sierra (1):
  tools: add hmm gup test for long term pinned device pages

Alistair Popple (2):
  migrate.c: Remove vma check in migrate_vma_setup()
  mm/gup.c: Migrate device coherent pages when pinning instead of failing

 mm/gup.c                               | 105 +++++++++++++++++++++++---
 mm/migrate.c                           |  34 ++++----
 tools/testing/selftests/vm/Makefile    |   2 +-
 tools/testing/selftests/vm/hmm-tests.c |  81 ++++++++++++++++++++-
 4 files changed, 194 insertions(+), 28 deletions(-)

base-commit: ef6b35306dd8f15a7e5e5a2532e665917a43c5d9
-- 
git-series 0.9.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-02-15 21:50 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07  4:26 [PATCH v2 0/3] Migrate device coherent pages on get_user_pages() Alistair Popple
2022-02-07  4:26 ` [PATCH v2 1/3] migrate.c: Remove vma check in migrate_vma_setup() Alistair Popple
2022-02-15 21:50   ` John Hubbard
2022-02-07  4:26 ` [PATCH v2 2/3] mm/gup.c: Migrate device coherent pages when pinning instead of failing Alistair Popple
2022-02-10 10:53   ` David Hildenbrand
2022-02-10 11:39     ` Alistair Popple
2022-02-10 11:47       ` David Hildenbrand
2022-02-10 23:41         ` Alistair Popple
2022-02-15 12:03           ` David Hildenbrand
2022-02-12  2:10   ` John Hubbard
2022-02-12  2:51     ` Alistair Popple
2022-02-12  3:04       ` John Hubbard
2022-02-14  0:05         ` Alistair Popple
2022-02-07  4:26 ` [PATCH v2 3/3] tools: add hmm gup test for long term pinned device pages Alistair Popple

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).