Skip to contentSkip to conversation

stating: ion: use hot page first in pool

RFC In review Gioh Kim 2 participants 3 messages Oct 29, 2014 Staging

lore
Share & tools
lore

Gioh Kim

author
#0 lore raw

RFC 1/1 stating: ion: use hot page first in pool

Hello,

I found that ion insert freed-page at the tail of list and extract at the head.

I think it is good for cache to use the most recently used page but these pages in pool are not cached memory.
So I'm not sure using hot page is better or not in this case.

What do you think about using hot page first?

-------------------------- 8< -----------------------------

Quoted 1 line

From 14c8455cc80628e56a27ace9603d29e5056835b5 Mon Sep 17 00:00:00 2001

From: Gioh Kim <[email protected]>
Date: Wed, 29 Oct 2014 13:44:28 +0900
Subject: [PATCH] staging: ion: use hot-page first

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

---
 drivers/staging/android/ion/ion_page_pool.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/android/ion/ion_page_pool.c +2 -2
index 5864f3d..3d6ac4f 100644
@@ -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

#1 lore raw
Quoted 12 lines · Gioh Kim

Hello,

I found that ion insert freed-page at the tail of list and extract at the head.

I think it is good for cache to use the most recently used page but these pages in pool are not cached memory.
So I'm not sure using hot page is better or not in this case.

What do you think about using hot page first?

This is something that really needs data collection and benchmarks to see if there is actually an improvement or not.

Thanks,
Laura

Signature · 3 lines
Qualcomm Innovation Center, Inc. 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
author
#2 lore raw

2014-10-30 오전 2:00에 Laura Abbott 이(가) 쓴 글:

Quoted 11 lines · Gioh Kim
Quoted 10 lines

Hello,

I found that ion insert freed-page at the tail of list and extract at the head.

I think it is good for cache to use the most recently used page but these pages in pool are not cached memory.
So I'm not sure using hot page is better or not in this case.

Quoted 11 lines
Quoted 2 lines

What do you think about using hot page first?

This is something that really needs data collection and benchmarks to see if there is actually an improvement or not.

Thanks,
Laura

Thank you for always.
I'm looking for a benchmark tool for my platform, but not founding yet.