dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Thomas Hellström (Intel)" <thomas_os@shipmail.org>
Cc: "DRI Development" <dri-devel@lists.freedesktop.org>,
	"Christian König" <christian.koenig@amd.com>,
	"Jason Gunthorpe" <jgg@nvidia.com>
Subject: Re: Fence wait in mmu_interval_notifier_ops::invalidate
Date: Mon, 14 Dec 2020 10:52:37 +0100	[thread overview]
Message-ID: <20201214095237.GX401619@phenom.ffwll.local> (raw)
In-Reply-To: <ae0e1e69-6550-94fb-c2b2-1ea04a0ae936@shipmail.org>

On Sun, Dec 13, 2020 at 04:09:25PM +0100, Thomas Hellström (Intel) wrote:
> 
> On 12/11/20 1:46 PM, Jason Gunthorpe wrote:
> > On Fri, Dec 11, 2020 at 08:50:53AM +0100, Thomas Hellström (Intel) wrote:
> > 
> > > My understanding of this particular case is that hardware would continue to
> > > DMA to orphaned pages that are pinned until the driver is done with
> > > DMA,
> > mmu notifier replaces pinning as the locking mechanism. Drivers using
> > mmu notifier should not be taking pins.
> > 
> > Keep in mind this was all built for HW with real shadow page tables
> > that can do fine grained manipulation.
> OK yes, that makes sense and in that context the fence wait is easier to
> understand. Looks like for example the radeon driver is using the notifier +
> get_user_pages() but there it looks like it's used to avoid having
> get_user_pages() clash with invalidation.

I think the radeon userptr implementation is bad enough that Christian
wants to outright remove it. At least he keeps talking about doing that.

So maybe not a good example to look at :-)
-Daniel

> > The GPU version of this to instead manipulate a command queue is a big
> > aberration from what was intended.
> > 
> > Jason
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-12-14  9:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 16:36 Fence wait in mmu_interval_notifier_ops::invalidate Thomas Hellström (Intel)
2020-12-09 16:37 ` Jason Gunthorpe
2020-12-09 16:46   ` Thomas Hellström (Intel)
2020-12-10 10:53     ` Christian König
2020-12-11  7:50       ` Thomas Hellström (Intel)
2020-12-11  8:57         ` Christian König
2020-12-11  9:37           ` Thomas Hellström (Intel)
2020-12-11 12:46         ` Jason Gunthorpe
2020-12-13 15:09           ` Thomas Hellström (Intel)
2020-12-14  9:52             ` Daniel Vetter [this message]
2020-12-14 10:21               ` Christian König

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=20201214095237.GX401619@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jgg@nvidia.com \
    --cc=thomas_os@shipmail.org \
    /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