[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1401098701-24049-3-git-send-email-heesub.shin@samsung.com>
Date: Mon, 26 May 2014 19:04:55 +0900
From: Heesub Shin <heesub.shin@...sung.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: John Stultz <john.stultz@...aro.org>,
Rebecca Schultz Zavin <rebecca@...roid.com>,
Colin Cross <ccross@...roid.com>,
Arve Hjønnevåg <arve@...roid.com>,
Mitchel Humpherys <mitchelh@...eaurora.org>,
Daeseok Youn <daeseok.youn@...il.com>,
Sunghwan Yun <sunghwan.yun@...sung.com>,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Heesub Shin <heesub.shin@...sung.com>
Subject: [PATCH 3/9] staging: ion: use compound pages on high order pages for
system heap
Using compound pages relieves burden on tracking the meta information
which are currently stored in page_info.
Signed-off-by: Heesub Shin <heesub.shin@...sung.com>
---
drivers/staging/android/ion/ion_page_pool.c | 4 +++-
drivers/staging/android/ion/ion_system_heap.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c
index 1684780..0141b3b 100644
--- a/drivers/staging/android/ion/ion_page_pool.c
+++ b/drivers/staging/android/ion/ion_page_pool.c
@@ -112,6 +112,8 @@ void ion_page_pool_free(struct ion_page_pool *pool, struct page *page)
{
int ret;
+ BUG_ON(pool->order != compound_order(page));
+
ret = ion_page_pool_add(pool, page);
if (ret)
ion_page_pool_free_pages(pool, page);
@@ -167,7 +169,7 @@ struct ion_page_pool *ion_page_pool_create(gfp_t gfp_mask, unsigned int order)
pool->low_count = 0;
INIT_LIST_HEAD(&pool->low_items);
INIT_LIST_HEAD(&pool->high_items);
- pool->gfp_mask = gfp_mask;
+ pool->gfp_mask = gfp_mask | __GFP_COMP;
pool->order = order;
mutex_init(&pool->mutex);
plist_node_init(&pool->list, order);
diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
index b554751..48e6a58 100644
--- a/drivers/staging/android/ion/ion_system_heap.c
+++ b/drivers/staging/android/ion/ion_system_heap.c
@@ -72,7 +72,7 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap,
if (order > 4)
gfp_flags = high_order_gfp_flags;
- page = alloc_pages(gfp_flags, order);
+ page = alloc_pages(gfp_flags | __GFP_COMP, order);
if (!page)
return NULL;
ion_pages_sync_for_device(NULL, page, PAGE_SIZE << order,
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists