lkml.org 
[lkml]   [2016]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 9/9] staging: ion: Fix page pool cache policy
Date
From: Amit Pundir <amit.pundir@linaro.org>

Fix redundant "buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE"
checks in if(!cached ...) condition block.

The previous patch, "ion: Handle the memory mapping correctly on
x86", is broken on android-3.18+ kernels. It conflicts with
upstream commit commit 53a91c68fa7b ("staging: ion: Add private
buffer flag to skip page pooling on free"), and breaks the
ION_PRIV_FLAG_SHRINKER_FREE private flag check logic.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Laura Abbott <labbott@redhat.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Reported-by: chenfeng <puck.chen@hisilicon.com>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
drivers/staging/android/ion/ion_system_heap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c
index fa62cc4..57d115d 100644
--- a/drivers/staging/android/ion/ion_system_heap.c
+++ b/drivers/staging/android/ion/ion_system_heap.c
@@ -83,7 +83,7 @@ static void free_buffer_page(struct ion_system_heap *heap,
unsigned int order = compound_order(page);
bool cached = ion_buffer_cached(buffer);

- if (!cached && !(buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE)) {
+ if (!cached) {
struct ion_page_pool *pool = heap->pools[order_to_index(order)];
if (buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE)
ion_page_pool_free_immediate(pool, page);
--
1.9.1
\
 
 \ /
  Last update: 2016-01-30 07:41    [W:0.105 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site