From: Roger He <Hongbo.He@amd.com>
To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: Roger He <Hongbo.He@amd.com>
Subject: [PATCH 2/4] drm/ttm: use NUM_PAGES_TO_ALLOC always
Date: Tue, 21 Nov 2017 17:32:20 +0800 [thread overview]
Message-ID: <1511256742-5601-3-git-send-email-Hongbo.He@amd.com> (raw)
In-Reply-To: <1511256742-5601-1-git-send-email-Hongbo.He@amd.com>
Change-Id: Ide96a1ccad9bb44b0bb0d80e123c2d810ba618ed
Signed-off-by: Roger He <Hongbo.He@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index 2b83c52..27b2402 100644
--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
@@ -520,8 +520,7 @@ static int ttm_alloc_new_pages(struct list_head *pages, gfp_t gfp_flags,
int r = 0;
unsigned i, j, cpages;
unsigned npages = 1 << order;
- unsigned max_cpages = min(count,
- (unsigned)(PAGE_SIZE/sizeof(struct page *)));
+ unsigned max_cpages = min(count, (unsigned)NUM_PAGES_TO_ALLOC);
/* allocate array for page caching change */
caching_array = kmalloc(max_cpages*sizeof(struct page *), GFP_KERNEL);
--
2.7.4
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-11-21 9:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 9:32 [PATCH 0/4] *** fix memory leak for HUGE PAGE *** Roger He
2017-11-21 9:32 ` [PATCH 1/4] drm/ttm: add page order in page pool Roger He
2017-11-21 9:52 ` Christian König
[not found] ` <1511256742-5601-2-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org>
2017-11-23 20:07 ` kbuild test robot
2017-11-23 21:49 ` kbuild test robot
2017-11-21 9:32 ` Roger He [this message]
[not found] ` <1511256742-5601-3-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org>
2017-11-21 9:41 ` [PATCH 2/4] drm/ttm: use NUM_PAGES_TO_ALLOC always Christian König
2017-11-21 9:32 ` [PATCH 3/4] drm/ttm: add page order support in ttm_pages_put Roger He
[not found] ` <1511256742-5601-4-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org>
2017-11-21 9:52 ` Christian König
[not found] ` <1511256742-5601-1-git-send-email-Hongbo.He-5C7GfCeVMHo@public.gmane.org>
2017-11-21 9:32 ` [PATCH 4/4] drm/ttm: free one in huge pool even shrink request less than one element Roger He
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=1511256742-5601-3-git-send-email-Hongbo.He@amd.com \
--to=hongbo.he@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--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