dri-devel Archive mirror
 help / color / mirror / Atom feed
From: Alex Sierra <alex.sierra@amd.com>
To: akpm@linux-foundation.org, Felix.Kuehling@amd.com,
	linux-mm@kvack.org, rcampbell@nvidia.com
Cc: jglisse@redhat.com, jgg@nvidia.com,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	hch@lst.de
Subject: [RFC PATCH v2 8/8] mm: call pgmap->ops->page_free for DEVICE_GENERIC pages
Date: Mon,  7 Jun 2021 15:42:26 -0500	[thread overview]
Message-ID: <20210607204226.7743-9-alex.sierra@amd.com> (raw)
In-Reply-To: <20210607204226.7743-1-alex.sierra@amd.com>

Add MEMORY_DEVICE_GENERIC case to free_zone_device_page
callback.
Device generic type memory case is now able to free its
pages properly.

Signed-off-by: Alex Sierra <alex.sierra@amd.com>
---
 mm/memremap.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/memremap.c b/mm/memremap.c
index 614b3d600e95..6c884e2542a9 100644
--- a/mm/memremap.c
+++ b/mm/memremap.c
@@ -438,7 +438,7 @@ struct dev_pagemap *get_dev_pagemap(unsigned long pfn,
 EXPORT_SYMBOL_GPL(get_dev_pagemap);
 
 #ifdef CONFIG_DEV_PAGEMAP_OPS
-static void free_device_private_page(struct page *page)
+static void free_device_page(struct page *page)
 {
 
 	__ClearPageWaiters(page);
@@ -477,7 +477,8 @@ void free_zone_device_page(struct page *page)
 		wake_up_var(&page->_refcount);
 		return;
 	case MEMORY_DEVICE_PRIVATE:
-		free_device_private_page(page);
+	case MEMORY_DEVICE_GENERIC:
+		free_device_page(page);
 		return;
 	default:
 		return;
-- 
2.17.1


  parent reply	other threads:[~2021-06-07 20:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 20:42 [RFC PATCH v2 0/8] Support DEVICE_GENERIC memory in migrate_vma_* Alex Sierra
2021-06-07 20:42 ` [RFC PATCH v2 1/8] ext4/xfs: add page refcount helper Alex Sierra
2021-06-08  0:29   ` Liam Howlett
2021-06-08 14:33     ` Matthew Wilcox
2021-06-09 19:23   ` Matthew Wilcox
2021-06-14 15:26     ` Felix Kuehling
2021-06-07 20:42 ` [RFC PATCH v2 2/8] mm: remove extra ZONE_DEVICE struct page refcount Alex Sierra
2021-06-07 20:42 ` [RFC PATCH v2 3/8] kernel: resource: lookup_resource as exported symbol Alex Sierra
2021-06-07 20:42 ` [RFC PATCH v2 4/8] drm/amdkfd: add SPM support for SVM Alex Sierra
2021-06-07 20:42 ` [RFC PATCH v2 5/8] drm/amdkfd: generic type as sys mem on migration to ram Alex Sierra
2021-06-07 20:42 ` [RFC PATCH v2 6/8] include/linux/mm.h: helpers to check zone device generic type Alex Sierra
2021-06-07 20:42 ` [RFC PATCH v2 7/8] mm: add generic type support to migrate_vma helpers Alex Sierra
2021-06-07 20:42 ` Alex Sierra [this message]
2021-06-08 14:26 ` [RFC PATCH v2 0/8] Support DEVICE_GENERIC memory in migrate_vma_* Matthew Wilcox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210607204226.7743-9-alex.sierra@amd.com \
    --to=alex.sierra@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hch@lst.de \
    --cc=jgg@nvidia.com \
    --cc=jglisse@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=rcampbell@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).