Browse Source

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>
Wu Fengguang 16 years ago
parent
commit
160334a0cf
1 changed files with 1 additions and 0 deletions
  1. 1 0
      mm/readahead.c

+ 1 - 0
mm/readahead.c

@@ -403,6 +403,7 @@ ondemand_readahead(struct address_space *mapping,
 
 
 		ra->start = start;
 		ra->start = start;
 		ra->size = start - offset;	/* old async_size */
 		ra->size = start - offset;	/* old async_size */
+		ra->size += req_size;
 		ra->size = get_next_ra_size(ra, max);
 		ra->size = get_next_ra_size(ra, max);
 		ra->async_size = ra->size;
 		ra->async_size = ra->size;
 		goto readit;
 		goto readit;