[PATCH] staging: ion: use hot-page first

From: Gioh Kim
Date: Wed Oct 29 2014 - 00:44:28 EST


A page near the head is hot for cache.
This patch makes pool use hot page first.

Signed-off-by: Gioh Kim <gioh.kim@xxxxxxx>
---
drivers/staging/android/ion/ion_page_pool.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/android/ion/ion_page_pool.c b/drivers/staging/android/ion/ion_page_pool.c
index 5864f3d..3d6ac4f 100644
--- a/drivers/staging/android/ion/ion_page_pool.c
+++ b/drivers/staging/android/ion/ion_page_pool.c
@@ -45,10 +45,10 @@ static int ion_page_pool_add(struct ion_page_pool *pool, struct page *page)
{
mutex_lock(&pool->mutex);
if (PageHighMem(page)) {
- list_add_tail(&page->lru, &pool->high_items);
+ list_add(&page->lru, &pool->high_items);
pool->high_count++;
} else {
- list_add_tail(&page->lru, &pool->low_items);
+ list_add(&page->lru, &pool->low_items);
pool->low_count++;
}
mutex_unlock(&pool->mutex);
--
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/