From: Alistair Popple <apopple@nvidia.com>
To: Felix Kuehling <felix.kuehling@amd.com>, Christoph Hellwig <hch@lst.de>
Cc: "Christoph Hellwig" <hch@lst.de>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Dan Williams" <dan.j.williams@intel.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Pan, Xinhui" <Xinhui.Pan@amd.com>,
"Ben Skeggs" <bskeggs@redhat.com>,
"Karol Herbst" <kherbst@redhat.com>,
"Lyude Paul" <lyude@redhat.com>, "Jason Gunthorpe" <jgg@ziepe.ca>,
"Logan Gunthorpe" <logang@deltatee.com>,
"Ralph Campbell" <rcampbell@nvidia.com>,
linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org,
nvdimm@lists.linux.dev, linux-mm@kvack.org
Subject: Re: [PATCH 6/8] mm: don't include <linux/memremap.h> in <linux/mm.h>
Date: Thu, 10 Feb 2022 13:10:47 +1100 [thread overview]
Message-ID: <2168128.7o4XcKHI9n@nvdebian> (raw)
In-Reply-To: <20220209174836.GA24864@lst.de>
On Thursday, 10 February 2022 4:48:36 AM AEDT Christoph Hellwig wrote:
> On Mon, Feb 07, 2022 at 04:19:29PM -0500, Felix Kuehling wrote:
> >
> > Am 2022-02-07 um 01:32 schrieb Christoph Hellwig:
> >> Move the check for the actual pgmap types that need the free at refcount
> >> one behavior into the out of line helper, and thus avoid the need to
> >> pull memremap.h into mm.h.
> >>
> >> Signed-off-by: Christoph Hellwig <hch@lst.de>
> >
> > The amdkfd part looks good to me.
> >
> > It looks like this patch is not based on Alex Sierra's coherent memory
> > series. He added two new helpers is_device_coherent_page and
> > is_dev_private_or_coherent_page that would need to be moved along with
> > is_device_private_page and is_pci_p2pdma_page.
>
> FYI, here is a branch that contains a rebase of the coherent memory
> related patches on top of this series:
>
> http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/pgmap-refcount
>
> I don't have a good way to test this, but I'll at least let the build bot
> finish before sending it out (probably tomorrow).
Thanks, I ran up hmm-test which revealed a few minor problems with the rebase.
Fixes below.
---
diff --git a/mm/gup.c b/mm/gup.c
index cbb49abb7992..8e85c9fb8df4 100644
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -2007,7 +2007,6 @@ static long check_and_migrate_movable_pages(unsigned long nr_pages,
if (!ret && list_empty(&movable_page_list) && !isolation_error_count)
return nr_pages;
- ret = 0;
unpin_pages:
for (i = 0; i < nr_pages; i++)
if (!pages[i])
diff --git a/mm/migrate.c b/mm/migrate.c
index f909f5a92757..1ae3e99baa50 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -2686,12 +2686,11 @@ static void migrate_vma_insert_page(struct migrate_vma *migrate,
swp_entry = make_readable_device_private_entry(
page_to_pfn(page));
entry = swp_entry_to_pte(swp_entry);
- } else {
- if (is_zone_device_page(page) &&
- is_device_coherent_page(page)) {
+ } else if (is_zone_device_page(page) &&
+ !is_device_coherent_page(page)) {
pr_warn_once("Unsupported ZONE_DEVICE page type.\n");
goto abort;
- }
+ } else {
entry = mk_pte(page, vma->vm_page_prot);
if (vma->vm_flags & VM_WRITE)
entry = pte_mkwrite(pte_mkdirty(entry));
next prev parent reply other threads:[~2022-02-10 2:11 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-07 6:32 start sorting out the ZONE_DEVICE refcount mess Christoph Hellwig
2022-02-07 6:32 ` [PATCH 1/8] mm: remove a pointless CONFIG_ZONE_DEVICE check in memremap_pages Christoph Hellwig
2022-02-07 18:08 ` Dan Williams
2022-02-07 19:22 ` Jason Gunthorpe
2022-02-08 7:17 ` Chaitanya Kulkarni
2022-02-08 8:06 ` Muchun Song
2022-02-07 6:32 ` [PATCH 2/8] mm: remove the __KERNEL__ guard from <linux/mm.h> Christoph Hellwig
2022-02-07 18:08 ` Dan Williams
2022-02-07 19:26 ` Jason Gunthorpe
2022-02-08 7:21 ` Chaitanya Kulkarni
2022-02-08 8:07 ` Muchun Song
2022-02-07 6:32 ` [PATCH 3/8] mm: remove pointless includes from <linux/hmm.h> Christoph Hellwig
2022-02-07 14:01 ` Jason Gunthorpe
2022-02-08 7:27 ` Chaitanya Kulkarni
2022-02-07 6:32 ` [PATCH 4/8] mm: move free_devmap_managed_page to memremap.c Christoph Hellwig
2022-02-07 19:06 ` Dan Williams
2022-02-07 19:27 ` Jason Gunthorpe
2022-02-08 7:34 ` Chaitanya Kulkarni
2022-02-08 8:09 ` Muchun Song
2022-02-07 6:32 ` [PATCH 5/8] mm: simplify freeing of devmap managed pages Christoph Hellwig
2022-02-07 19:34 ` Jason Gunthorpe
2022-02-07 23:42 ` Dan Williams
2022-02-08 7:50 ` Chaitanya Kulkarni
2022-02-07 6:32 ` [PATCH 6/8] mm: don't include <linux/memremap.h> in <linux/mm.h> Christoph Hellwig
2022-02-07 17:38 ` Logan Gunthorpe
2022-02-07 19:35 ` Jason Gunthorpe
2022-02-07 21:19 ` Felix Kuehling
2022-02-08 6:46 ` Christoph Hellwig
2022-02-09 17:48 ` Christoph Hellwig
2022-02-10 2:10 ` Alistair Popple [this message]
2022-02-10 6:45 ` Christoph Hellwig
2022-02-10 21:00 ` Felix Kuehling
2022-02-07 23:49 ` Dan Williams
2022-02-08 23:53 ` Dan Williams
2022-02-09 6:22 ` Christoph Hellwig
2022-02-07 6:32 ` [PATCH 7/8] mm: remove the extra ZONE_DEVICE struct page refcount Christoph Hellwig
2022-02-07 19:21 ` Jason Gunthorpe
2022-02-08 2:25 ` Ralph Campbell
2022-02-09 3:30 ` Dan Williams
2022-02-09 6:23 ` Christoph Hellwig
2022-02-09 12:29 ` Jason Gunthorpe
2022-02-09 13:53 ` Christoph Hellwig
2022-02-09 14:14 ` Jason Gunthorpe
2022-02-07 6:32 ` [PATCH 8/8] fsdax: depend on ZONE_DEVICE || FS_DAX_LIMITED Christoph Hellwig
2022-02-07 19:36 ` Jason Gunthorpe
2022-02-07 23:51 ` start sorting out the ZONE_DEVICE refcount mess Logan Gunthorpe
2022-02-08 3:03 ` Miaohe Lin
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=2168128.7o4XcKHI9n@nvdebian \
--to=apopple@nvidia.com \
--cc=Xinhui.Pan@amd.com \
--cc=akpm@linux-foundation.org \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=bskeggs@redhat.com \
--cc=christian.koenig@amd.com \
--cc=dan.j.williams@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=felix.kuehling@amd.com \
--cc=hch@lst.de \
--cc=jgg@ziepe.ca \
--cc=kherbst@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=logang@deltatee.com \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=nvdimm@lists.linux.dev \
--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