dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: John Hubbard <jhubbard@nvidia.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	etnaviv@lists.freedesktop.org,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Russell King <linux+etnaviv@armlinux.org.uk>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 2/2] drm/etnaviv: User FOLL_LONGTERM in userptr
Date: Fri, 19 Mar 2021 20:16:33 +0100	[thread overview]
Message-ID: <YFT4kfzFNh+azuCv@phenom.ffwll.local> (raw)
In-Reply-To: <1aabe37b-d79b-8456-641d-aaf8fe2c330d@nvidia.com>

On Mon, Mar 01, 2021 at 02:26:01AM -0800, John Hubbard wrote:
> On 3/1/21 01:52, Daniel Vetter wrote:
> > There's no mmu notifier or anything like that, releasing this pin is
> > entirely up to userspace. Hence FOLL_LONGTERM.
> > 
> > No cc: stable for this patch since a lot of the infrastructure around
> > FOLL_LONGETRM (like not allowing it for pages currently sitting in
> 
>   ^FOLL_LONGTERM
> 
> > ZONE_MOVEABLE before they're migrated) is still being worked on. So
> > not big benefits yet.
> 
> Yes. Great write-up, that's very clear, and it's exactly where we're at.
> 
> Reviewed-by: John Hubbard <jhubbard@nvidia.com>

Both patches pushed to drm-misc-fixes. 2nd one maybe not required there,
but easier due to conflicts.

Thanks for the review.
-Daniel

> 
> 
> thanks,
> -- 
> John Hubbard
> NVIDIA
> 
> > 
> > Cc: John Hubbard <jhubbard@nvidia.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > Cc: Lucas Stach <l.stach@pengutronix.de>
> > Cc: Russell King <linux+etnaviv@armlinux.org.uk>
> > Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
> > Cc: etnaviv@lists.freedesktop.org
> > ---
> >   drivers/gpu/drm/etnaviv/etnaviv_gem.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.c b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
> > index a9e696d05b33..db69f19ab5bc 100644
> > --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.c
> > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.c
> > @@ -689,7 +689,8 @@ static int etnaviv_gem_userptr_get_pages(struct etnaviv_gem_object *etnaviv_obj)
> >   		struct page **pages = pvec + pinned;
> >   		ret = pin_user_pages_fast(ptr, num_pages,
> > -					  FOLL_WRITE | FOLL_FORCE, pages);
> > +					  FOLL_WRITE | FOLL_FORCE | FOLL_LONGTERM,
> > +					  pages);
> >   		if (ret < 0) {
> >   			unpin_user_pages(pvec, pinned);
> >   			kvfree(pvec);
> > 

-- 
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:[~2021-03-19 19:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-01  9:52 [PATCH 1/2] drm/etnaviv: Use FOLL_FORCE for userptr Daniel Vetter
2021-03-01  9:52 ` [PATCH 2/2] drm/etnaviv: User FOLL_LONGTERM in userptr Daniel Vetter
2021-03-01 10:26   ` John Hubbard
2021-03-19 19:16     ` Daniel Vetter [this message]
2021-03-01 10:28 ` [PATCH 1/2] drm/etnaviv: Use FOLL_FORCE for userptr Lucas Stach
2021-03-01 13:50   ` Daniel Vetter
2021-03-19 19:09 ` Daniel Vetter
2021-03-19 19:13   ` Lucas Stach

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=YFT4kfzFNh+azuCv@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=etnaviv@lists.freedesktop.org \
    --cc=jhubbard@nvidia.com \
    --cc=linux+etnaviv@armlinux.org.uk \
    /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 NNTP newsgroup(s).