From: David Stevens <stevensd@chromium.org>
To: Christian Koenig <christian.koenig@amd.com>,
dri-devel@lists.freedesktop.org
Cc: David Stevens <stevensd@chromium.org>
Subject: [PATCH] drm/ttm: use compound pages for THP
Date: Wed, 13 Jan 2021 17:47:33 +0900 [thread overview]
Message-ID: <20210113084733.1181460-1-stevensd@chromium.org> (raw)
Compound page metadata is necessary for page reference counting to work
properly on pages besides the head page. Without it, put_page
corresponding to the last outstanding get_page call on a tail page will
end up freeing that page, even if the bo still references the page.
Signed-off-by: David Stevens <stevensd@chromium.org>
---
drivers/gpu/drm/ttm/ttm_pool.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 7b2f60616750..09239b93dc2c 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -83,7 +83,6 @@ static struct page *ttm_pool_alloc_page(struct ttm_pool *pool, gfp_t gfp_flags,
gfp_flags |= GFP_TRANSHUGE_LIGHT | __GFP_NORETRY |
__GFP_KSWAPD_RECLAIM;
gfp_flags &= ~__GFP_MOVABLE;
- gfp_flags &= ~__GFP_COMP;
}
if (!pool->use_dma_alloc) {
--
2.30.0.284.gd98b1dd5eaa7-goog
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2021-01-14 9:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 8:47 David Stevens [this message]
2021-01-13 8:58 ` [PATCH] drm/ttm: use compound pages for THP Christian König
2021-01-13 9:33 ` David Stevens
2021-01-13 12:44 ` 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=20210113084733.1181460-1-stevensd@chromium.org \
--to=stevensd@chromium.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).