linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 hmm 0/9] Small hmm_range_fault() cleanups
@ 2020-03-24  1:14 Jason Gunthorpe
  2020-03-24  1:14 ` [PATCH v2 hmm 1/9] mm/hmm: remove pgmap checking for devmap pages Jason Gunthorpe
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Jason Gunthorpe @ 2020-03-24  1:14 UTC (permalink / raw)
  To: Jerome Glisse, Ralph Campbell, Felix.Kuehling
  Cc: linux-mm, John Hubbard, dri-devel, amd-gfx, Christoph Hellwig,
	Philip Yang, Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

This is v2 of the first simple series with a few additional patches of little
adjustments.

This needs an additional patch to the hmm tester:

diff --git a/tools/testing/selftests/vm/hmm-tests.c b/tools/testing/selftests/vm/hmm-tests.c
index 033a12c7ab5b6d..da15471a2bbf9a 100644
--- a/tools/testing/selftests/vm/hmm-tests.c
+++ b/tools/testing/selftests/vm/hmm-tests.c
@@ -1274,7 +1274,7 @@ TEST_F(hmm2, snapshot)
 	/* Check what the device saw. */
 	m = buffer->mirror;
 	ASSERT_EQ(m[0], HMM_DMIRROR_PROT_ERROR);
-	ASSERT_EQ(m[1], HMM_DMIRROR_PROT_NONE);
+	ASSERT_EQ(m[1], HMM_DMIRROR_PROT_ERROR);
 	ASSERT_EQ(m[2], HMM_DMIRROR_PROT_ZERO | HMM_DMIRROR_PROT_READ);
 	ASSERT_EQ(m[3], HMM_DMIRROR_PROT_READ);
 	ASSERT_EQ(m[4], HMM_DMIRROR_PROT_WRITE);

v2 changes:
 - Simplify and rename the flags, rework hmm_vma_walk_test in patch 2 (CH)
 - Adjust more comments in patch 3 (CH, Ralph)
 - Put the ugly boolean logic into a function in patch 3 (CH)
 - Update commit message of patch 4 (CH)
 - Adjust formatting in patch 5 (CH)
 Patches 6, 7, 8 are new

v1: https://lore.kernel.org/r/20200320164905.21722-1-jgg@ziepe.ca

Jason Gunthorpe (9):
  mm/hmm: remove pgmap checking for devmap pages
  mm/hmm: return the fault type from hmm_pte_need_fault()
  mm/hmm: remove unused code and tidy comments
  mm/hmm: remove HMM_FAULT_SNAPSHOT
  mm/hmm: remove the CONFIG_TRANSPARENT_HUGEPAGE #ifdef
  mm/hmm: use device_private_entry_to_pfn()
  mm/hmm: do not unconditionally set pfns when returning EBUSY
  mm/hmm: do not set pfns when returning an error code
  mm/hmm: return error for non-vma snapshots

 Documentation/vm/hmm.rst                |  12 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |   2 +-
 drivers/gpu/drm/nouveau/nouveau_svm.c   |   2 +-
 include/linux/hmm.h                     | 109 +--------
 mm/hmm.c                                | 312 ++++++++++--------------
 5 files changed, 133 insertions(+), 304 deletions(-)

-- 
2.25.2



^ permalink raw reply related	[flat|nested] 24+ messages in thread
* [PATCH v3 hmm 0/9] Small hmm_range_fault() cleanups
@ 2020-03-27 20:00 Jason Gunthorpe
  2020-03-27 20:00 ` [PATCH v2 hmm 2/9] mm/hmm: return the fault type from hmm_pte_need_fault() Jason Gunthorpe
  0 siblings, 1 reply; 24+ messages in thread
From: Jason Gunthorpe @ 2020-03-27 20:00 UTC (permalink / raw)
  To: Jerome Glisse, Ralph Campbell, Felix.Kuehling
  Cc: linux-mm, John Hubbard, dri-devel, amd-gfx, Christoph Hellwig,
	Philip Yang, Jason Gunthorpe

From: Jason Gunthorpe <jgg@mellanox.com>

This is v3 with some minor adjustments made.

We are at the end of the dev cycle, and as nothing major has come up I'll push
this toward linux-next to get some coverage and decide next week what goes
this cycle.

v3 changes:
 - Keep NEED_WRITE_FAULT and NEED_FAULT separate (CH)
 - Use CH's vesion of hmm_can_fault and drop the inline
v2: https://lore.kernel.org/r/20200324011457.2817-1-jgg@ziepe.ca
v1: https://lore.kernel.org/r/20200320164905.21722-1-jgg@ziepe.ca

Thanks to everyone who looked on this,
Jason

Jason Gunthorpe (9):
  mm/hmm: remove pgmap checking for devmap pages
  mm/hmm: return the fault type from hmm_pte_need_fault()
  mm/hmm: remove unused code and tidy comments
  mm/hmm: remove HMM_FAULT_SNAPSHOT
  mm/hmm: remove the CONFIG_TRANSPARENT_HUGEPAGE #ifdef
  mm/hmm: use device_private_entry_to_pfn()
  mm/hmm: do not unconditionally set pfns when returning EBUSY
  mm/hmm: do not set pfns when returning an error code
  mm/hmm: return error for non-vma snapshots

 Documentation/vm/hmm.rst                |  12 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c |   2 +-
 drivers/gpu/drm/nouveau/nouveau_svm.c   |   2 +-
 include/linux/hmm.h                     | 109 +--------
 mm/hmm.c                                | 307 +++++++++---------------
 5 files changed, 128 insertions(+), 304 deletions(-)

-- 
2.25.2



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

end of thread, other threads:[~2020-03-28  8:10 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-24  1:14 [PATCH v2 hmm 0/9] Small hmm_range_fault() cleanups Jason Gunthorpe
2020-03-24  1:14 ` [PATCH v2 hmm 1/9] mm/hmm: remove pgmap checking for devmap pages Jason Gunthorpe
2020-03-24  1:14 ` [PATCH v2 hmm 2/9] mm/hmm: return the fault type from hmm_pte_need_fault() Jason Gunthorpe
2020-03-24  7:27   ` Christoph Hellwig
2020-03-24 18:58     ` Jason Gunthorpe
2020-03-24  1:14 ` [PATCH v2 hmm 3/9] mm/hmm: remove unused code and tidy comments Jason Gunthorpe
2020-03-24  7:27   ` Christoph Hellwig
2020-03-24  1:14 ` [PATCH v2 hmm 4/9] mm/hmm: remove HMM_FAULT_SNAPSHOT Jason Gunthorpe
2020-03-24  7:33   ` Christoph Hellwig
2020-03-24 19:31     ` Jason Gunthorpe
2020-03-24  1:14 ` [PATCH v2 hmm 5/9] mm/hmm: remove the CONFIG_TRANSPARENT_HUGEPAGE #ifdef Jason Gunthorpe
2020-03-24  7:33   ` Christoph Hellwig
2020-03-24  1:14 ` [PATCH v2 hmm 6/9] mm/hmm: use device_private_entry_to_pfn() Jason Gunthorpe
2020-03-24  7:34   ` Christoph Hellwig
2020-03-24  1:14 ` [PATCH v2 hmm 7/9] mm/hmm: do not unconditionally set pfns when returning EBUSY Jason Gunthorpe
2020-03-24  7:37   ` Christoph Hellwig
2020-03-24 15:47     ` Jason Gunthorpe
2020-03-24  1:14 ` [PATCH v2 hmm 8/9] mm/hmm: do not set pfns when returning an error code Jason Gunthorpe
2020-03-24  7:38   ` Christoph Hellwig
2020-03-24  1:14 ` [PATCH v2 hmm 9/9] mm/hmm: return error for non-vma snapshots Jason Gunthorpe
2020-03-24  7:45   ` Christoph Hellwig
2020-03-26 21:21 ` [PATCH v2 hmm 0/9] Small hmm_range_fault() cleanups Ralph Campbell
2020-03-27 20:00 [PATCH v3 " Jason Gunthorpe
2020-03-27 20:00 ` [PATCH v2 hmm 2/9] mm/hmm: return the fault type from hmm_pte_need_fault() Jason Gunthorpe
2020-03-28  8:10   ` Christoph Hellwig

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).