From: Christoph Hellwig <hch@lst.de>
To: Ralph Campbell <rcampbell@nvidia.com>
Cc: Christoph Hellwig <hch@lst.de>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Jerome Glisse <jglisse@redhat.com>,
John Hubbard <jhubbard@nvidia.com>,
Jason Gunthorpe <jgg@mellanox.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RESEND PATCH] mm: fix migrate_vma_setup() src_owner and normal pages
Date: Wed, 24 Jun 2020 09:22:00 +0200 [thread overview]
Message-ID: <20200624072200.GA18609@lst.de> (raw)
In-Reply-To: <a0dbf913-2bd0-b032-596e-520e678d5b5b@nvidia.com>
On Tue, Jun 23, 2020 at 10:05:19AM -0700, Ralph Campbell wrote:
>
> On 6/23/20 4:40 AM, Christoph Hellwig wrote:
>> On Mon, Jun 22, 2020 at 03:20:08PM -0700, Ralph Campbell wrote:
>>> The caller of migrate_vma_setup() does not know what type of page is
>>> stored in the CPU's page tables. Pages within the specified range are
>>> free to be swapped out, migrated, or freed until after migrate_vma_setup()
>>> returns. The caller needs to set struct migrate_vma.src_owner in case a
>>> page is a ZONE device private page that the device owns and might want to
>>> migrate. However, the current code skips normal anonymous pages if
>>> src_owner is set, thus preventing those pages from being migrated.
>>> Remove the src_owner check for normal pages since src_owner only applies
>>> to device private pages and allow a range of normal and device private
>>> pages to be migrated.
>>
>> src_owner being set means we want to migrate from device private
>> memory to normal host DRAM. What kind of problem do you see of
>> not touching already present pages in that path?
>>
>
> The problem is that migrate_vma_setup() invalidates the address range so any
> previously migrated pages to device private memory have to be faulted in
> again. By having the PFN of those device private pages in the src array, the
> driver can reinstate the device MMU mappings and avoid the page faults.
Maybe add that to the changelog?
prev parent reply other threads:[~2020-06-24 7:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 22:20 Ralph Campbell
2020-06-23 11:40 ` Christoph Hellwig
2020-06-23 17:05 ` Ralph Campbell
2020-06-24 7:22 ` Christoph Hellwig [this message]
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=20200624072200.GA18609@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=jgg@mellanox.com \
--cc=jglisse@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--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