From: Wu Fengguang <fengguang.wu@intel.com>
Date: Tue, 16 Jun 2009 22:31:23 +0000 (-0700)
Subject: readahead: increase interleaved readahead size
X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=160334a0cfa8e578b718f81038026326845d07d7;p=linux.git

readahead: increase interleaved readahead size

Make sure interleaved readahead size is larger than request size.  This
also makes the readahead window grow up more quickly.

Reported-by: Xu Chenfeng <xcf@ustc.edu.cn>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Ying Han <yinghan@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---

diff --git a/mm/readahead.c b/mm/readahead.c
index 56731158309b3..16378b90843ec 100644
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -403,6 +403,7 @@ ondemand_readahead(struct address_space *mapping,
 
 		ra->start = start;
 		ra->size = start - offset;	/* old async_size */
+		ra->size += req_size;
 		ra->size = get_next_ra_size(ra, max);
 		ra->async_size = ra->size;
 		goto readit;