From: Fengguang Wu Remove readahead_ratio from the growth_limit computing in state based method. It simplifies the size ramp up rules to: ahead_window_size = request_size + current_window_size * 2 + readahead_max / 16; The first two sizes are apparent. The last one has two effects: 1) Ensure that we get acceptable readahead size in early start up phase. It is an analog to the old 'first x4 then x2' trick. 2) Ensure that we reach readahead_max within 8 steps. It is good for the laptop mode. A user may set a huge readahead_max, and expect the kernel to do large I/Os right away. Signed-off-by: Fengguang Wu Signed-off-by: Andrew Morton --- mm/readahead.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN mm/readahead.c~readahead-state-based-method-decouple-readahead_ratio-from-growth_limit mm/readahead.c --- a/mm/readahead.c~readahead-state-based-method-decouple-readahead_ratio-from-growth_limit +++ a/mm/readahead.c @@ -1099,7 +1099,7 @@ state_based_readahead(struct address_spa growth_limit = req_size; growth_limit += ra_max / 16; - growth_limit += (2 + readahead_ratio / 64) * ra_old; + growth_limit += 2 * ra_old; if (growth_limit > ra_max) growth_limit = ra_max; _