readahead: increase interleaved readahead size
authorWu Fengguang <fengguang.wu@intel.com>
Tue, 16 Jun 2009 22:31:23 +0000 (15:31 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 17 Jun 2009 02:47:29 +0000 (19:47 -0700)
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>
mm/readahead.c

index 5673115..16378b9 100644 (file)
@@ -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;