[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <cover.516a938ce97eb805791da6e2df508eb0dce413b8.1643698773.git-series.apopple@nvidia.com>
Date: Tue, 1 Feb 2022 18:05:54 +1100
From: Alistair Popple <apopple@...dia.com>
To: akpm@...ux-foundation.org, linux-mm@...ck.org
Cc: Felix.Kuehling@....com, rcampbell@...dia.com,
linux-ext4@...r.kernel.org, linux-xfs@...r.kernel.org,
amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
hch@....de, jgg@...dia.com, jglisse@...hat.com,
willy@...radead.org, alex.sierra@....com, jhubbard@...dia.com,
Alistair Popple <apopple@...dia.com>
Subject: [PATCH 0/3] Migrate device coherent pages on get_user_pages()
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] and should apply cleanly on top of that.
[1] - https://lore.kernel.org/linux-mm/20220128200825.8623-1-alex.sierra@amd.com/
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(-)
--
git-series 0.9.1
Powered by blists - more mailing lists