All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Ralph Campbell <rcampbell@nvidia.com>
Cc: nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Jerome Glisse <jglisse@redhat.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Christoph Hellwig <hch@lst.de>,
	Jason Gunthorpe <jgg@mellanox.com>,
	Ben Skeggs <bskeggs@redhat.com>
Subject: Re: [RESEND PATCH 2/3] nouveau: fix mixed normal and device private page migration
Date: Wed, 24 Jun 2020 09:23:55 +0200	[thread overview]
Message-ID: <20200624072355.GB18609@lst.de> (raw)
In-Reply-To: <20200622233854.10889-3-rcampbell@nvidia.com>

On Mon, Jun 22, 2020 at 04:38:53PM -0700, Ralph Campbell wrote:
> The OpenCL function clEnqueueSVMMigrateMem(), without any flags, will
> migrate memory in the given address range to device private memory. The
> source pages might already have been migrated to device private memory.
> In that case, the source struct page is not checked to see if it is
> a device private page and incorrectly computes the GPU's physical
> address of local memory leading to data corruption.
> Fix this by checking the source struct page and computing the correct
> physical address.

I'm really worried about all this delicate code to fix the mixed
ranges.  Can't we make it clear at the migrate_vma_* level if we want
to migrate from or two device private memory, and then skip all the work
for regions of memory that already are in the right place?  This might be
a little more work initially, but I think it leads to a much better
API.

  parent reply	other threads:[~2020-06-24  7:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-22 23:38 [RESEND PATCH 0/3] nouveau: fixes for SVM Ralph Campbell
2020-06-22 23:38 ` Ralph Campbell
2020-06-22 23:38 ` [RESEND PATCH 1/3] nouveau: fix migrate page regression Ralph Campbell
2020-06-22 23:38   ` Ralph Campbell
2020-06-23  0:51   ` John Hubbard
2020-06-23  0:51     ` John Hubbard
2020-06-25  5:23     ` [Nouveau] " Ben Skeggs
2020-06-25  5:25       ` Ben Skeggs
2020-06-22 23:38 ` [RESEND PATCH 2/3] nouveau: fix mixed normal and device private page migration Ralph Campbell
2020-06-22 23:38   ` Ralph Campbell
2020-06-23  0:30   ` John Hubbard
2020-06-23  0:30     ` John Hubbard
2020-06-23  1:42     ` Ralph Campbell
2020-06-23  1:42       ` Ralph Campbell
2020-06-24  7:23   ` Christoph Hellwig [this message]
2020-06-24 18:10     ` Ralph Campbell
2020-06-24 18:10       ` Ralph Campbell
2020-06-25 17:25       ` Ralph Campbell
2020-06-25 17:25         ` Ralph Campbell
2020-06-25 17:31         ` Jason Gunthorpe
2020-06-25 17:42           ` Ralph Campbell
2020-06-25 17:42             ` Ralph Campbell
2020-06-22 23:38 ` [RESEND PATCH 3/3] nouveau: make nvkm_vmm_ctor() and nvkm_mmu_ptp_get() static Ralph Campbell
2020-06-22 23:38   ` Ralph Campbell
2020-06-23  0:57   ` John Hubbard
2020-06-23  0:57     ` John Hubbard

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=20200624072355.GB18609@lst.de \
    --to=hch@lst.de \
    --cc=bskeggs@redhat.com \
    --cc=jgg@mellanox.com \
    --cc=jglisse@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nouveau@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.