dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Christian König" <christian.koenig@amd.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
	Huang Rui <ray.huang@amd.com>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/ttm: stop using GFP_TRANSHUGE_LIGHT
Date: Wed, 13 Jan 2021 16:11:19 +0100	[thread overview]
Message-ID: <CAKMK7uG9TqgX_LJXwZRymaTF1t2WJg-DE85zGwb-0yd=orsooA@mail.gmail.com> (raw)
In-Reply-To: <3e340506-79a6-1fb0-0632-aa2d4a0cc223@gmail.com>

On Wed, Jan 13, 2021 at 3:46 PM Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
>
> Am 13.01.21 um 14:27 schrieb Daniel Vetter:
> > On Wed, Jan 13, 2021 at 02:13:25PM +0100, Christian König wrote:
> >> The only flag we really need is __GFP_NOMEMALLOC, highmem depends on
> >> dma32 and moveable/compound should never be set in the first place.
> >>
> >> Signed-off-by: Christian König <christian.koenig@amd.com>
> > Needs Fixes: line and References to the GFP_TRANSHUGE_LIGHT report from
> > Hans and for the chromium report for the mmap fail.
>
> Which tag should I use for this? Just Link:?

Link: is for the patch submission itself (to link to archives with the
review&discussions), usually it's References is for bug reports and
anything else. I think at least. You can have multiple Link: tags too,
if you record all the previous submissions, that's a bit up to
subsystems and how they all roll.
-Daniel


> >   With those:
> >
> > Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >
> > Also I guess really time for me to stitch together that hack to catch
> > dma-buf sglist struct page abusers ...
>
> Oh, yes please.
>
> Christian.
>
> > -Daniel
> >
> >> ---
> >>   drivers/gpu/drm/ttm/ttm_pool.c | 11 ++++++-----
> >>   1 file changed, 6 insertions(+), 5 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
> >> index 8cd776adc592..11e0313db0ea 100644
> >> --- a/drivers/gpu/drm/ttm/ttm_pool.c
> >> +++ b/drivers/gpu/drm/ttm/ttm_pool.c
> >> @@ -79,12 +79,13 @@ static struct page *ttm_pool_alloc_page(struct ttm_pool *pool, gfp_t gfp_flags,
> >>      struct page *p;
> >>      void *vaddr;
> >>
> >> -    if (order) {
> >> -            gfp_flags |= GFP_TRANSHUGE_LIGHT | __GFP_NORETRY |
> >> +    /* Don't set the __GFP_COMP flag for higher order allocations.
> >> +     * Mapping pages directly into an userspace process and calling
> >> +     * put_page() on a TTM allocated page is illegal.
> >> +     */
> >> +    if (order)
> >> +            gfp_flags |= __GFP_NOMEMALLOC | __GFP_NORETRY |
> >>                      __GFP_KSWAPD_RECLAIM;
> >> -            gfp_flags &= ~__GFP_MOVABLE;
> >> -            gfp_flags &= ~__GFP_COMP;
> >> -    }
> >>
> >>      if (!pool->use_dma_alloc) {
> >>              p = alloc_pages(gfp_flags, order);
> >> --
> >> 2.25.1
> >>
>


-- 
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-01-13 15:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 13:13 [PATCH] drm/ttm: stop using GFP_TRANSHUGE_LIGHT Christian König
2021-01-13 13:27 ` Daniel Vetter
2021-01-13 14:46   ` Christian König
2021-01-13 15:11     ` Daniel Vetter [this message]
2021-01-15 12:14 ` Christian König
2021-01-15 12:54   ` Hans de Goede
2021-01-15 13:00     ` Christian König
2021-01-27 15:45 ` Michel Dänzer

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='CAKMK7uG9TqgX_LJXwZRymaTF1t2WJg-DE85zGwb-0yd=orsooA@mail.gmail.com' \
    --to=daniel@ffwll.ch \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=ray.huang@amd.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;
as well as URLs for NNTP newsgroup(s).