diff options
author | Heesub Shin <heesub.shin@samsung.com> | 2014-05-28 06:52:55 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-29 20:40:33 (GMT) |
commit | bdeb9f1c4276864e97a725c8c0a8bc9a8686edfe (patch) | |
tree | 7dff4d4093976d892e40e9cd12a3ba8441e3c865 /drivers/staging/android/ion/ion_page_pool.c | |
parent | 38c003b113ceab37f80d020999d3ec2cbf784da3 (diff) | |
download | linux-bdeb9f1c4276864e97a725c8c0a8bc9a8686edfe.tar.xz |
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@samsung.com>
Reviewed-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Tested-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/ion/ion_page_pool.c')
-rw-r--r-- | drivers/staging/android/ion/ion_page_pool.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c index 111777c..c1cea42 100644 --- a/drivers/staging/android/ion/ion_page_pool.c +++ b/drivers/staging/android/ion/ion_page_pool.c @@ -95,6 +95,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); @@ -150,7 +152,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); |