linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/migrate: remove cpages-- in migrate_vma_finalize()
@ 2020-08-27 19:07 Ralph Campbell
  2020-08-27 19:07 ` [PATCH] mm/migrate: remove obsolete comment about device public Ralph Campbell
  0 siblings, 1 reply; 3+ messages in thread
From: Ralph Campbell @ 2020-08-27 19:07 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: Jerome Glisse, John Hubbard, Christoph Hellwig, Jason Gunthorpe,
	Andrew Morton, Ralph Campbell

The variable struct migrate_vma->cpages is only used in
migrate_vma_setup(). There is no need to decrement it in
migrate_vma_finalize() since it is never checked.

Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
---

This applies to linux-mm and is for Andrew Morton's tree.

 mm/migrate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 0b945c8031be..eb859f7a9811 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -3087,7 +3087,6 @@ void migrate_vma_finalize(struct migrate_vma *migrate)
 
 		remove_migration_ptes(page, newpage, false);
 		unlock_page(page);
-		migrate->cpages--;
 
 		if (is_zone_device_page(page))
 			put_page(page);
-- 
2.20.1


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

* [PATCH] mm/migrate: remove obsolete comment about device public
  2020-08-27 19:07 [PATCH] mm/migrate: remove cpages-- in migrate_vma_finalize() Ralph Campbell
@ 2020-08-27 19:07 ` Ralph Campbell
  2020-08-28 11:13   ` Jason Gunthorpe
  0 siblings, 1 reply; 3+ messages in thread
From: Ralph Campbell @ 2020-08-27 19:07 UTC (permalink / raw)
  To: linux-mm, linux-kernel
  Cc: Jerome Glisse, John Hubbard, Christoph Hellwig, Jason Gunthorpe,
	Andrew Morton, Ralph Campbell

Device public memory never had an in tree consumer and was removed in
commit 25b2995a35b6 ("mm: remove MEMORY_DEVICE_PUBLIC support").
Delete the obsolete comment.

Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
---

This applies to linux-mm and is for Andrew Morton's tree.

 mm/migrate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index eb859f7a9811..34fdd25a26db 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -381,7 +381,7 @@ static int expected_page_refs(struct address_space *mapping, struct page *page)
 	int expected_count = 1;
 
 	/*
-	 * Device public or private pages have an extra refcount as they are
+	 * Device private pages have an extra refcount as they are
 	 * ZONE_DEVICE pages.
 	 */
 	expected_count += is_device_private_page(page);
-- 
2.20.1


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

* Re: [PATCH] mm/migrate: remove obsolete comment about device public
  2020-08-27 19:07 ` [PATCH] mm/migrate: remove obsolete comment about device public Ralph Campbell
@ 2020-08-28 11:13   ` Jason Gunthorpe
  0 siblings, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2020-08-28 11:13 UTC (permalink / raw)
  To: Ralph Campbell
  Cc: linux-mm, linux-kernel, Jerome Glisse, John Hubbard,
	Christoph Hellwig, Andrew Morton

On Thu, Aug 27, 2020 at 12:07:35PM -0700, Ralph Campbell wrote:
> Device public memory never had an in tree consumer and was removed in
> commit 25b2995a35b6 ("mm: remove MEMORY_DEVICE_PUBLIC support").
> Delete the obsolete comment.
> 
> Signed-off-by: Ralph Campbell <rcampbell@nvidia.com>
> ---
> 
> This applies to linux-mm and is for Andrew Morton's tree.

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason

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

end of thread, other threads:[~2020-08-28 11:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 19:07 [PATCH] mm/migrate: remove cpages-- in migrate_vma_finalize() Ralph Campbell
2020-08-27 19:07 ` [PATCH] mm/migrate: remove obsolete comment about device public Ralph Campbell
2020-08-28 11:13   ` Jason Gunthorpe

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