diff options
| author | Lee Susman <lsusman@codeaurora.org> | 2013-05-05 17:31:17 +0300 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 20:07:40 +0200 |
| commit | 231e3ac4c3712b6e5304056319da66c68a6595cf (patch) | |
| tree | fdd065cc6dbfde5ecb9fb3ab417cb40fcedf9d22 /mm/readahead.c | |
| parent | e8ff419a0c98a144a85b9bfcfbd175a1927cb926 (diff) | |
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: Stefan Guendhoer <stefan@guendhoer.com>
Diffstat (limited to 'mm/readahead.c')
| -rw-r--r-- | mm/readahead.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/readahead.c b/mm/readahead.c index daed28dd5..87bc49730 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -186,6 +186,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); |
