From: Gioh Kim <gioh.kim@lge.com>
To: gregkh@linuxfoundation.org, john.stultz@linaro.org,
rebecca@android.com, lauraa@codeaurora.org,
dan.carpenter@oracle.com, "Minchan Kim" <minchan@kernel.org>,
'김준수' <iamjoonsoo.kim@lge.com>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
gunho.lee@lge.com, gioh.kim@lge.com
Subject: [RFC] stating: ion: use hot page first in pool
Date: Wed, 29 Oct 2014 13:57:15 +0900 [thread overview]
Message-ID: <545073AB.5060502@lge.com> (raw)
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< -----------------------------
>From 14c8455cc80628e56a27ace9603d29e5056835b5 Mon Sep 17 00:00:00 2001
From: Gioh Kim <gioh.kim@lge.com>
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.
Signed-off-by: Gioh Kim <gioh.kim@lge.com>
---
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
next reply other threads:[~2014-10-29 4:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 4:57 Gioh Kim [this message]
2014-10-29 17:00 ` [RFC] stating: ion: use hot page first in pool Laura Abbott
2014-10-29 23:09 ` Gioh Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=545073AB.5060502@lge.com \
--to=gioh.kim@lge.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=gunho.lee@lge.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=john.stultz@linaro.org \
--cc=lauraa@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=rebecca@android.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox