From: Fengguang Wu The context based readahead is pretty conservative by nature, so do not apply readahead_ratio here. Signed-off-by: Fengguang Wu Signed-off-by: Andrew Morton --- mm/readahead.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff -puN mm/readahead.c~readahead-context-based-method-remove-readahead_ratio mm/readahead.c --- a/mm/readahead.c~readahead-context-based-method-remove-readahead_ratio +++ a/mm/readahead.c @@ -1244,9 +1244,7 @@ static unsigned long count_history_pages * Check the far pages coarsely. * The enlarged count will contribute to the look-ahead size. */ - lookback = ra_max * (LOOKAHEAD_RATIO + 1) * - 100 / (readahead_ratio | 1); - + lookback = ra_max * LOOKAHEAD_RATIO; for (count += ra_max; count < lookback; count += ra_max) if (!__probe_page(mapping, offset - count)) break; @@ -1392,7 +1390,8 @@ has_history_pages: adjust_rala_aggressive(ra_max, &ra_size, &la_size); ra_set_class(ra, RA_CLASS_CONTEXT_AGGRESSIVE); } else { - ra_size = max(ra_min, ra_size * readahead_ratio / 100); + if (ra_size < ra_min) + ra_size = ra_min; if (!adjust_rala(ra_max, &ra_size, &la_size)) return -1; ra_set_class(ra, RA_CLASS_CONTEXT); _