aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLee Susman <lsusman@codeaurora.org>2013-06-27 16:09:42 -0500
committerZiyan <jaraidaniel@gmail.com>2016-01-08 10:43:02 +0100
commit37527390652db2937cda6206f28e11ef34d92ada (patch)
tree0016122e0cf676e117be7f3f7794918578f6b76f /mm
parentaea0d63eed9227a15fcc48aa55da7f7027cf7f79 (diff)
downloadkernel_samsung_tuna-37527390652db2937cda6206f28e11ef34d92ada.tar.gz
kernel_samsung_tuna-37527390652db2937cda6206f28e11ef34d92ada.tar.bz2
kernel_samsung_tuna-37527390652db2937cda6206f28e11ef34d92ada.zip
mm: pass readahead info down to the i/o scheduler
Some i/o schedulers (i.e. row-iosched, cfq-iosched) deploy an idling algorithm in order to be better synced with the readahead algorithm. Idling is a prediction algorithm for incoming read requests. In this patch we mark pages which are part of a readahead window, by setting a newly introduced flag. With this flag, the i/o scheduler can identify a request which is associated with a readahead page. This enables the i/o scheduler's idling mechanism to be en-sync with the readahead mechanism and, in turn, can increase read throughput. Change-Id: I0654f23315b6d19d71bcc9cc029c6b281a44b196 Signed-off-by: Lee Susman <lsusman@codeaurora.org> Signed-off-by: Paul Reioux <reioux@gmail.com> Conflicts: include/linux/page-flags.h Conflicts: include/linux/page-flags.h
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c1
-rw-r--r--mm/readahead.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 470993a14e5..4410edd4e33 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5846,6 +5846,7 @@ static struct trace_print_flags pageflag_names[] = {
#ifdef CONFIG_MEMORY_FAILURE
{1UL << PG_hwpoison, "hwpoison" },
#endif
+ {1UL << PG_readahead, "PG_readahead" },
{-1UL, NULL },
};
diff --git a/mm/readahead.c b/mm/readahead.c
index df60df9e32c..4df6dc77df0 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -210,6 +210,9 @@ __do_page_cache_readahead(struct address_space *mapping, struct file *filp,
if (!page)
break;
page->index = page_offset;
+
+ page->flags |= (1L << PG_readahead);
+
list_add(&page->lru, &page_pool);
if (page_idx == nr_to_read - lookahead_size)
SetPageReadahead(page);